On this day

Last week I added a new archive page to Micro.blog-hosted sites. It includes dates and the first part of each post, marked up with Microformats. Jonathan LaCour used this to write a script that parses the HTML looking for posts on today’s date in previous years, then pulls the full content for each post it finds and assembles them together.

But it gets better. After Jonathan mentioned that it took quite a while to parse the large HTML file, I added a JSON Feed version of the archive page. If you’ve posted to Micro.blog since yesterday, this has been created for you at your-domain.com/archive/index.json. Jonathan updated the script to use the JSON Feed and it can now return the “on this day” posts very quickly, with no configuration needed because it’s all driven from a JavaScript include on your blog.

You can see this in action on my own blog’s on this day page. It works for any Micro.blog-hosted blog by pasting in a few lines of HTML from the Micro Memories project on GitHub.

This is the potential for indie blogging and simple formats. Adding a feature to Micro.blog-hosted blogs enabled a new tool I hadn’t even thought of. There was some discussion in the IndieWeb chat, but it took very little coordination because all of this is built with web stuff, not proprietary APIs.

Manton Reece @manton
🕸💍