Closed vinay-keshava closed 1 year ago
it's generating the full content in the RSS feed, for example, the blog section https://imfing.github.io/hextra/blog/index.xml
and RSS is enabled here in the docs site for sections: https://github.com/imfing/hextra/blob/c799160e86279ade57033721c9b6698451baf65a/exampleSite/hugo.yaml#L10-L13
i've added the above config to hugo.yaml still the whole content is not shown on RSS
try localhost:1313/blog/index.xml it should contain the full content RSS feed
i tried it for blog/ and docs/ too
I'll look into this. It would be nice if you could share an example repository for reproducing the issue.
AFAIK, unless a custom RSS template is specified, Hugo includes only a summary of an article (or blog post) in RSS feed. This is due to <description>{{ .Summary | html }}</description>
in the default RSS template.
To include full post content in feed, a custom RSS template should be defined with .Content
(instead of .Summary
).
INMHO, it would be better to introduce a switch that allows controlling this feature (displaying full posts in the RSS feed) through a configuration parameter, with 'summary' as the default setting. Here is an example where this is implemented: https://github.com/hugo-sid/hugo-blog-awesome/pull/113.
AFAIK, unless a custom RSS template is used, Hugo includes only a summary of the article in RSS feed. This is due to the
<description>{{ .Summary | html }}</description>
in the default RSS template.To include the full post content in feed, a custom RSS template should be defined with
.Content
(instead of.Summary
).INMHO, it's better to provide a switch to control this feature (full post in RSS feed) via one of the config parameters. Here is an example where this is implemented: https://github.com/hugo-sid/hugo-blog-awesome/pull/113.
@hugo-sid Thanks for the info.
FYI, I have implemented full content RSS in layouts/section/section.rss.xml
for sections like blog, but the contents are not placed in the description tags.
If the OP wants descriptions tag, then the only way is to override the RSS template.
Thanks for the info @imfing.
FYI, I have implemented full content RSS in
layouts/section/section.rss.xml
for sections like blog, but the contents are not placed in the description tags.
Yes, I saw that just now.
If the OP wants descriptions tag, then the only way is to override the RSS template.
Agree.
BTW, this is what I see at https://imfing.github.io/hextra/blog/index.xml :
BTW, this is what I see at https://imfing.github.io/hextra/blog/index.xml
@hugo-sid I was aware of this, basically it lacks the xmlns:content="http://purl.org/rss/1.0/modules/content/"
attribute on <rss>
I will create a PR to fix a couple of things for the RSS feed.
@hugo-sid I've created a PR #75 the RSS feed xml is parsed correctly by the browser now: https://deploy-preview-75--hugo-hextra.netlify.app/blog/index.xml
@hugo-sid I've created a PR #75 the RSS feed xml is parsed correctly by the browser now: https://deploy-preview-75--hugo-hextra.netlify.app/blog/index.xml
Great!
Great https://github.com/vinay-keshava/blog this is the link to my site,i've also updated the hugo.yaml to generate rss but gives a 404 for both blog Have used the template repository
Please rename contents/posts
to contents/blog
otherwise access it using /posts
Please rename
contents/posts
tocontents/blog
otherwise access it using
/posts
i have renamed it to blog/ now it says XML Parsing Error: prefix not bound to a namespace Location: http://localhost:1313/blog/index.xml Line Number 17, Column 7:
for both blog/index.xml and docs/index.xml
Can you also update the theme version please?
Can you also update the theme version please?
in go.mod
module github.com/imfing/hextra-starter-template
go 1.21
require github.com/imfing/hextra v0.5.0 // indirect
Can you also update the theme version please?
in go.mod
![image](https://github.com/imfing/hextra/assets/74909320/4bb68352-442e-4fc7-9d04-bea225da2902)
after updating the version the theme version docs/ directory generates rss but not blog/(have pushed the changes to the repo)
module github.com/imfing/hextra-starter-template
go 1.21
require github.com/imfing/hextra v0.5.0 // indirect
You may need to create a _index.md
file under the blog section.
Please follow the exampleSite provided in this repository
You may need to create a
_index.md
file under the blog section.Please follow the exampleSite provided in this repository
Its still the same even after adding the _index.md i've followed the exampleSite in this repository.
@vinay-keshava I took a quick look of your repo, there are two issues:
type: post
from your blog posts files, it's gonna mess up how Hugo looks up for template. I think this is the main reason why the RSS feed not showing the full content. https://github.com/vinay-keshava/blog/blob/6045e00579d0fad578ac217a40e87ff17eea044b/content/blog/contributing-to-debian.md?plain=1#L6after remove the frontmatter, the RSS content shows up:
next: blog/interception-vimproved
@imfing thanks a lot for helping,i was a noob at hugo. Fixed these issues and it started working
@vinay-keshava no problem, this might also help people who may encounter the same problem in the future 😃
I've used the template repository to create a hugo site and the index.xml doesn't generate full contents it only generates summary Help or insight needed on this !
Enable Full Text RSS feed
this is an example site which generates full content which enhances readability in RSS https://blog.sahilister.in/index.xml