RSS full content in Hugo
Hugo, the static site generator that I use to build this blog website, has built-in support for RSS, which is great, but doesn’t have native support for full content display in RSS, which is annoying (yeah, I get you, MacKenzie!).
I could’ve just changed the {{ .Summary }} part of the RSS feed template to {{ .Content }}, but after reading this post by CSL, which points out that doing so may cause unwanted side effects, I then decided to borrow an existing solution that works.
I copied and edited the rss.xml layout template code from the Hugo theme Stack. This in turn necessitated the addition of the rssFullContent parameter, which allows me to toggle between showing summarised or full content in the RSS feed, to my site configuration file.
I then added render-codeblock.rss.xml and render-image.rss.xml as demonstrated in the same post by CSL mentioned above for proper fetching of codeblocks and images in the RSS feed.
The end result seems okay at least to me. Hopefully this gives a better experience of reading this blog via RSS.
Screw it. I’m overcomplicating things. Actually the images still failed to load for some reason. I’m sticking with the easy solution of modifying to {{ .Content }}. At least it works fine for me.