How I Automatically Include a Blog Description in My RSS Feed

I’ve been asked a couple of times how I get this short site description to be included in every entry of my RSS feed.

HeyDingus is a blog by Jarrod Blundy about technology, the great outdoors, and other musings. If you like what you see — the blog postswallpapersshortcutsscripts, or anything — please consider leaving a tip, checking out my store, or just sharing my work. Your support is much appreciated!

I’m always happy to get replies on Mastodon, or by good ol’ email.

Well, in case it helps anyone else, here’s how!

I actually pondered the same question for quite a while when reading the Basic Apple Guy and MacStories RSS feeds, which include similar regular descriptors. I can’t speak to how those sites accomplish it, but I figured out that I could use the templating system in Blot, my website host, to call up that blurb in multiple places.

Blot uses the Mustache templating system, so other hosts that also use Mustache could probably piggyback off this method directly. Different template systems might require more tweaks, but I’m fairly confident the same result could be achieved in Hugo or elsewhere.

Anyway, for Blot, I first made a new text file called blogblurg.html and wrote out that paragraph you see at the bottom of every page on my website. You’ll notice that it’s written in HTML, not Markdown.

iA Writer window show the HTML text of my Blog Blurb file.
blogblurg.html in iA Writer

Then, to make it show up, I call that template in the footer template (footer.html). That’s when I realized I could do the same thing within my RSS template. I edited that feed.rss file so that right after the body of each item it adds a horizontal rule and then the very same blurb.

The text of my RSS feed file with the blog blurb import part highlighted.
It’s funny how those two little bits, body and > blogblurb, do all the work to pull in the content for each entry.

Now, each time I publish something, I know that the reader will see that little write-up — either in the footer of my website if they are reading on the web, or in each entry of my RSS feed. And if I ever want to change the wording or update a link, I just edit the blogblurb.html file and it’s updated everywhere.

The Reeder app with my RSS feed pulled up, and the blog blurb highlighted at the bottom of the entry.
The final result. Here’s what it’s like to read one of my articles via RSS in Reeder.

Tips Blogging

❮ Previous post

HeyDingus for Relay FM for St. Jude for Ending Childhood Cancer September 19, 2023

Next post ❯

Call People (and Things) What They Ask To Be Called September 20, 2023