What are great ways to add an RSS feed to my website?
I use pandoc as my html renderer. (My drafts have a yaml front matter and are written in Markdown). I see a lot of talk about RSS feeds in the webweaving community. But there are a lot of ways to make a website, so the accepted inputs for RSS feed generators are all over the place.
Just a note that freepost has separate comminuty for questions
Are you sure about this? RSS format is XML. For example this is the template that freepost is using. Any XML library should be able to parse RSS without much problems.
I don’t see the problem in adding an RSS (or Atom) feed to my site if it helps people revisit. There’s an RSS feed generator on 32-bit cafe that obviously isn’t going to work with my yaml front matter for example.
Sorry I think I’m struggling a little bit with understanding the question. If I understand correctly, you are asking how to add RSS to your website. RSS is basically XML, so you just have to write an XML file. If you’re using pandoc for rendering HTML templates, I think you can reuse the same tool (thus avoiding any other XML library); just write XML tags inside your template instead of HTML.
Does this make sense?
Not really. unless you provide a sample invocation of what you’re suggesting.
But I found:
https://github.com/chambln/pandoc-rss
How do you generate the HTML? I assume you have a folder containing markdown files (with yaml headers), a template file, and a script that calls pandoc on each single file?
pandoc by itself doesn’t support RSS, and ChatGPT recommends filters that don’t exist.
When I generate pages, I use a Makefile, and hit
make article-nickname
when I want to generate a new page. Each recipe is basically this:What’s ideal is reducing the number of times I’m copying and pasting the front matter in the yaml.
With pandoc you can use custom templates. Basically like your command, but with an additional
--template=
argument. The template file will contain your XML and the variables you want to use.