Duncan Wither

Home Notes Github LinkedIn

RSS Feed Creation

Creating a RSS feed generator for the website is not super difficult to do. Needs some basic things, but you can steal a lot from a template.

Step one is to ensure your HTML is tight. Luckily I had a couple things working my way:

  1. The HTML was being generated by pandoc so was naturally clean.
  2. The HTML parser I was using (hxselect) provided some feedback.

Main thing is to ensure all tags are shut. Single tag elements (pardon my wording) need a “/>”. For example: Use <br /> not just <br> even though the browser reads it correctly.

Note:

My generator runs off the index.md file of the website so I can easily control dates and

Further Reading

See this article on jazzin’ up your feed. I’ve not bothered (as you can see), but you might want to.

Add a line (as per this spec) to the header of your html for autodescovery.


  1. Its not going to be run often enough / impact the runtime enough to matter.↩︎