Published on 2023-12-15
Find it here or in the header on the top right-hand corner.
Imagine a world where you can see the content of each website you like inside the app of your choosing, read the articles offline and save them on disk for later, be notified whenever the website has something new, and all of which is implemented with an open standard. Well that was most of the web some years ago and this blog now does all of that.
And it's not hard! The only thing we need is to serve a feed.xml
file that lists articles with some metadata such as 'updated at' and a UUID to be able to uniquely identify an article. This XML file is an Atom feed which has a nice RFC.
I implemented that in under an hour, skimming at the RFC and examples. It's a bit hacky but it works. The script to do so is here. And you can do too! Again, it's not hard. Here goes:
time.Now()
. It's not exactly accurate, it should probably be the most recent mtime
across articles but it's good enough.*.html
) file in the directory, we add an entry (<entry>
) in the XML document with:
mtime
of the file locallyctime
of the file locallyupdated at
will still hint at the update).And...that's it really. Enjoy reading these articles in your favorite app!
If you enjoy what you're reading, you want to support me, and can afford it: Support me. That allows me to write more cool articles!
This blog is open-source! If you find a problem, please open a Github issue. The content of this blog as well as the code snippets are under the BSD-3 License which I also usually use for all my personal projects. It's basically free for every use but you have to mention me as the original author.