David's Blog

More details on my Micropub site

I wanted to share a little bit about the technology I mentioned on my recent "launch day" post for the new blog engine.

I don't remember exactly when I first found the indieweb wiki, it was probably sometime around the end of 2019 or maybe early 2020. A lot of the discussion there around owning your own writing meshed with some ideas I'd had floating around in my head for a while about wanting to make sure the public "stuff" I put on the Internet was controlled by me in the end. Even if the posts are copied and/or linked from social media profiles that I have - having them link back to a website that I control means I have the content no matter what those external platforms do. This is also a big reason I wouldn't want to blog on an external domain/service like Medium. Owning your own domain, even if you don't bother running the underlying web server, provides a lot of optionality and control over your content.

Anyway, I'd been thinking for a good while that I wanted to move further in that direction. Perhaps that meant doing most of my social media "posts" on my blog and just posting links elsewhere or something in between. I did not want to shut out people I connected with on external networks, but having control over my content, and, yes, even having a smaller but more decentralized way to interact if desired was an intriguing to me. Having the technology to enable that first was growing in importance to me. So coming across the indieweb movement and reading about Micropub, syndicating posts back out to other networks, and allowing for social interactions via comments and whatnot via things like webmentions really got me excited.

There were already implementations of all of this both in open source form via some of the early pushers of this website format as well as some proprietary/commercial implementations such as Micro.blog. The non-open source ones, while achieving the sort of decentralized web social network abilities I described above didn't necessarily maintain the control I wanted over my posts. And while I could have operated an existing server, I thought it might be a fun side project to attempt to implement a new server that understands these protocols. They all seemed relatively straightforward and based on very common, understandable web standards as a base.

This idea stuck with me and in March of last year I finally got started. I was able to get a proof of concept of accepting Notes (Indieweb "Tweets") fairly quickly, there were a number of things to work through before I could fully swap out my existing personal website if I wanted to maintain the existing posts and URLs (unless I segmented the new server/posts off into some sub-URL/subdomain). While I didn't end up getting through the full minimum viable implementation until earlier this week, the idea and excitement around this stuck with me. I just didn't always have the energy to work on it in the most exhausting of years.

I now have a very rough working Micropub server. It's missing a fair amount of features that I'll need to add over time (e.g. support for media uploads/post attachments in entries and basically all of the more "social" indieweb features) . However, I did manage to ensure I support both normal posts ("entries") and shorter posts ("notes", as mentioned above), those can be provided as HTML or Markdown and my server will do the right thing, mostly. Tagging of entries is supported, and I even added a feature that I didn't really have before which is an index/archive page on a per-tag basis. This was all just enough to script up some importing of the Markdown files that comprised my previous static site (and many of those had been exported from the earlier WordPress incarnation).

So why did I go about a full rewrite instead of wiring up some functionality to make my static site still static but perhaps with a bit of dynamic flair to allow for external posting? Mostly, because I didn't want to go down the route of having both local Markdown files and some other source of content. Would newer posts had to have been created as markdown, committed, pushed to my git repo, and the site be rebuild/redeployed on creation? That didn't sound like the sort of plumbing work I wanted to do, though it seems like others have gotten that to work on other static site generators like Jekyll. So instead I opted for the "more fun" route of writing it from scratch. This is a personal website after all, it's ok if it's not a fully featured CMS or whatever.

What's next? I want to support some of the more "fun" Microformats that some clients can create, such as likes, bookmarks, reviews https://indieweb.org/review (such as for books), or even food https://indieweb.org/food posts. Food posts in particular could be fun for tracking teas I try. I'd like to find a way to layout the site so that some of these more noisy post types down drown out longer form writing. And I want to implement stuff like POSSE, webmentions, etc. I have no plans (yet) to build a Micropub client - used for creating new posts - there already seem to be many good ones out there for many different post types. In the end I'm hoping that having this new way of posting will encourage me to write and post more and implementing some of these more fun post types could help with that too.