diff options
Diffstat (limited to 'content/posts')
-rw-r--r-- | content/posts/2021-10-26-rss-feed-no-longer-annoyingly-trunca.md | 33 |
1 files changed, 33 insertions, 0 deletions
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" |