Avatar

Adding the Eleventy RSS Feed Plugin

posted: Sat, Feb 15, 2025 | tagged: | | dev | web
return to blog home |


Reference Links:

let's add some functionality to this blog thing of mine

After the immense joy (plenty of sarcasm intended) of upgrading 11ty to v3.0 yesterday, I decided it was about time that I added a RSS syndication feed to the blog. Groundbreaking for 2025, right?

Fortunately for me, and in keeping with much of the spirit of the easy of which 11ty makes these sort of activities, the implementation was pretty straightforward and took less than 10 minutes. I'm not sure why I didn't do this earlier, but I can't complain about the ease of the process.

the process, let's get this started

So, how did this all go down you ask? Start by reading the 11ty RSS Feed Plugin documentation. Then, it was a simple process of carrying out the following steps:

  1. Let's install the RSS plugin
npm install @11ty/eleventy-plugin-rss
  1. I went the route of the manual template build, so I updated my eleventy.js file to include the reference for the plugin.
const rssPlugin = require("@11ty/eleventy-plugin-rss");

module.exports = function (eleventyConfig) {
  eleventyConfig.addPlugin(rssPlugin);
};
  1. I then added a feed.njk Nunjuck template to the base of my 11ty project source. I follwed the example code from the plugin documentation, made a few tweaks for my own needs and that was it!

I don't know if anyone will actually subscribe to this feed, and frankly it doesn't really matter. I'm doing this for me, having fun with it when the mood strikes me, and that is more than enough for me. If in the meantime you are getting some form of enjoyment out of this, you can always drop me a line on my socials:

Until the next one...

I also threw in some pagination to the blog page, just for good measure.


related posts

return to blog home

signature