adityatelange / hugo-PaperMod

A fast, clean, responsive Hugo theme.
https://adityatelange.github.io/hugo-PaperMod/
MIT License
9.9k stars 2.69k forks source link

rss feed does not take content of the posts #372

Closed mrtrkmn closed 3 years ago

mrtrkmn commented 3 years ago

Describe the bug When RSS enabled in profileMode, it does not take content of the posts. Instead, it just brings titles and subtitles with post date and link.

Steps to reproduce the behavior: mrturkmen.com/index.xml

Expected behavior:

I am expecting to get everything like all post content.

Screenshots

index xml
adityatelange commented 3 years ago

PaperMod has the template what HUGO ships with, by default. You can see here -> https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml

We have just added a override for the default one for not having pages such as search and archives in RSS feed. Ref: https://github.com/adityatelange/hugo-PaperMod/commit/b6af9eddee7f816b01a68836344b36d30de4a492

mrtrkmn commented 3 years ago

I got it but that's a little bit weird actually, because in this context, it is not possible to import a blog post to another website through RSS, since it does not provide content of the post. I am a little bit in doubt that what would be the purpose of this RSS feature then. Do not you think that RSS should include the post content as well ?

adityatelange commented 3 years ago

I got it but that's a little bit weird actually, because in this context, it is not possible to import a blog post to another website through RSS, since it does not provide content of the post. I am a little bit in doubt that what would be the purpose of this RSS feature then. Do not you think that RSS should include the post content as well ?

I'm not aware if RSS is used for importing blog posts to another website.

RSS is meant for providing quick short updates about the posts added. That includes summary, heading, date, etc.

IMO RSS is used for getting updates about the content being added on a website so that the reader remains updated about it. RSS makes it simpler because users don't need to add any of their personal details such as email to get the updates, instead RSS relies on client apps which fetches the feed periodically.

IMHO RSS was never meant to be a bypass for the users/readers to not visit the website and read all of the content via the feeds.

mrtrkmn commented 3 years ago

Well, I still think that it should include the content of posts, I have used to use Jekyll template earlier and there was no such a thing that RSS provides only summary, heading and date. I was able to get full content of posts and it was really convenient to import it to other sources such as dev.to, medium.com and more. I do not know which one is better or correct, but I think it is not good that RSS does not include content of the post.

daSmirnov commented 3 years ago

By default Hugo and most themes (but definitely not all!) will show the post summary in the RSS feed, getting full content is easy to achieve however just edit the below in your install.

/themes/PaperMod/layouts/_default/rss.xml and change line 47 to:

<description>{{ .Content | html }}</description>

Could get into debate about the best default. Back in the early 2000s it was rare to see anything but full content in feeds, but as it became more popular with websites that had an ad driven business model so it was more used to drive traffic to those websites. I role with full content as it just makes things more open and accessible - plus I read almost entirely in an RSS reader, and avoid hitting websites where possible as the reading experience usually isn't as good. I'm much more likely to subscribe to a site with full content. :-)

mrtrkmn commented 3 years ago

@daSmirnov thanks for your input, however your proposal does not seem working. However, yeah it is easy to fix I agree, nevertheless, it would be nice to have it in the theme repository as a support to have. For this reason, I will not change it on my local for now. I hope, @adityatelange has a plan about it.

adityatelange commented 3 years ago

@daSmirnov thanks for your input, however your proposal does not seem working. However, yeah it is easy to fix I agree, nevertheless, it would be nice to have it in the theme repository as a support to have. For this reason, I will not change it on my local for now. I hope, @adityatelange has a plan about it.

Maybe we can add an option to enable full post contents with .Content as said in above comment. However it would be difficult to track upstream template changes by Hugo. Also IDK about how fine this would work with non text objects in the post.

mrtrkmn commented 3 years ago

Thanks @adityatelange for the update !