Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding xmlns:content namespace to RSS feed and only write content:encoded if something on .Content #1411

Merged
merged 2 commits into from
Feb 3, 2024

Conversation

DJLink
Copy link
Contributor

@DJLink DJLink commented Feb 1, 2024

What does this PR change? What problem does it solve?

2 changes to layouts/_default/rss.xml

  • Adding a xmlns:content namespace to produce correct RSS output when content:encoded is used, namespace from here: https://web.resource.org/rss/1.0/modules/content/

  • Added a check to {{- if site.Params.ShowFullTextinRSS }} to also check if .Content, this way pages that don't have anything don't end up with empty content, or for example RSS or tags pages or categories where they don't have .Content

Was the change discussed in an issue or in the Discussions before?
No

PR Checklist

  • This change adds/updates translations and I have used the template present here.
  • I have enabled maintainer edits for this PR.
  • I have verified that the code works as described/as intended.
  • This change adds a Social Icon which has a permissive license to use it.
  • This change does not include any CDN resources/links.
  • This change does not include any unrelated scripts such as bash and python scripts.
  • This change updates the overridden internal templates from HUGO's repository.

Copy link

sonarqubecloud bot commented Feb 1, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@adityatelange adityatelange linked an issue Feb 3, 2024 that may be closed by this pull request
Copy link
Owner

@adityatelange adityatelange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@adityatelange adityatelange merged commit a4a0f8d into adityatelange:master Feb 3, 2024
1 check passed
@vindex10 vindex10 mentioned this pull request Feb 8, 2024
7 tasks
ayedaemon pushed a commit to ayedaemon/hugo-PaperMod that referenced this pull request Mar 27, 2024
…oded if something on .Content (adityatelange#1411)

* Added xmlns:content namespace for valid RSS feeds with content:encoded

* Only write <content:encoded> in RSS if ShotFullTextinRSS and .Content has something

fixes: adityatelange#1385
jdxgfty pushed a commit to jdxgfty/hugo-PaperMod that referenced this pull request Nov 3, 2024
…oded if something on .Content (adityatelange#1411)

* Added xmlns:content namespace for valid RSS feeds with content:encoded

* Only write <content:encoded> in RSS if ShotFullTextinRSS and .Content has something

fixes: adityatelange#1385
nsrahmad pushed a commit to nsrahmad/hugo-PaperMod that referenced this pull request Dec 7, 2024
…oded if something on .Content (adityatelange#1411)

* Added xmlns:content namespace for valid RSS feeds with content:encoded

* Only write <content:encoded> in RSS if ShotFullTextinRSS and .Content has something

fixes: adityatelange#1385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] ShowFullTextInRSS creates invalid RSS feed
2 participants