From 9f26f336c7e335235cdd8c8f6c818ab6e8a5eee4 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Wed, 27 Oct 2021 00:54:08 -0400 Subject: add posts/2021-10-26-rss-feed-no-longer-annoyingly-trunca.md --- ...1-10-26-rss-feed-no-longer-annoyingly-trunca.md | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 content/posts/2021-10-26-rss-feed-no-longer-annoyingly-trunca.md (limited to 'content/posts/2021-10-26-rss-feed-no-longer-annoyingly-trunca.md') diff --git a/content/posts/2021-10-26-rss-feed-no-longer-annoyingly-trunca.md b/content/posts/2021-10-26-rss-feed-no-longer-annoyingly-trunca.md new file mode 100644 index 0000000..195a0fe --- /dev/null +++ b/content/posts/2021-10-26-rss-feed-no-longer-annoyingly-trunca.md @@ -0,0 +1,33 @@ +--- +slug: rss-feed-no-longer-annoyingly-trunca +title: "RSS Feed No Longer Annoyingly Trunca..." +date: "2021-10-26T23:53:22-04:00" +--- + +[Hugo's default RSS feed template][default] truncates [RSS][] feeds by +default. Long time readers [probably know how I feel about that][argh]. + +I copied the [default Hugo RSS feed template][default] and made the +following changes: + +* Limited the feed to pages in the "Posts" section (**Note:** this may + not work for your site). +* Set the default post limit to 15 posts, because [Hugo][] was trying to + include all posts in the [RSS][] feed. +* Changed feed items to include complete post contents as [HTML][]. + +The updated template is available [here][gist]. You can use it on your +site by copying it to `layouts/_default/index.xml`. + +[default]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml + "Default Hugo RSS feed template" +[rss]: https://en.wikipedia.org/wiki/RSS + "Really Simple Syndication" +[argh]: {{< ref "posts/2009-06-25-don-t-truncate-your-rss-feed.html" >}} + "Don't Truncate Your RSS Feed" +[hugo]: https://gohugo.io/ + "Hugo static site generator" +[html]: https://en.wikipedia.org/wiki/HTML + "HyperText Markup Language" +[gist]: https://gist.github.com/b7e12f07a204fa10ccbfaf401e6b67ff + "Updated Hugo RSS feed template" -- cgit v1.2.3