This Blog Has RSS Now!
Posted on
This blog has an RSS feed now! I've wanted to get one set up for a while, but I built it up to be a huge task in my head and I kept putting it off.
I use Eleventy for this site, and there's an official RSS plugin. It's so easy to set up. All I had to do was copy/paste the command to npm install
the plugin, copy/paste the line to initialize the plugin in my .eleventy.js
file, and make minimal changes to the sample feed template provided in the documentation.
As always, Eleventy is just the best.
I did run into one "gotcha" when I was validating the RSS feed. When I opened the feed page in my browser, it applied some formatting that lets you expand and collapse sections, etc. I initially copy/pasted from that page into the W3C Validation Service, and it threw all sorts of errors. Eventually, I realized that the special browser formatting removes some of the XML attributes, specifically the namespace declaration. I had to "view source" on that browser-generated XML page and copy that code into the validator. Then it passed validation with just a couple minor warnings. 😎