kaushalmodi / hugo-atom-feed

Hugo theme component for ATOM feed custom Output Format
GNU General Public License v3.0
40 stars 13 forks source link

Allow excerpt/read more #2

Open okelet opened 5 years ago

okelet commented 5 years ago

Right now, the feed contains the full content of the posts. It would be useful to allow by configuration to show only the excerpt, including a read more link, like in the posts list.

https://gohugo.io/content-management/summaries/

kaushalmodi commented 5 years ago

Right now the whole .Content is published in the feed.

https://github.com/kaushalmodi/hugo-atom-feed/blob/b431c7701a469384b73e49b357f873907d4773e8/layouts/_default/list.atom.xml#L43

I can add an option to show only an excerpt, though, not sure what the best way would be to add a "Read More" link. I can probably end the content string in "...". User then just clicks the title to read the full content.

PS: I am a believer of not have to redirect the user just to see the full content (to be further spammed by ads, unnecessary JS, etc.), when the feed itself has the ability to show the full content.