Got metaWeblog API working with Pollen

Posted  

I’m terribly excited. I think I finally got metaWeblog API working with Pollen-based blog. This was easier than I expected, but it was no small feat. In the recent past, I tried adding support for a newer API called Micropub which has W3C backing and is the darling of the IndieWeb community. I’ve found that specification to be confusing and overly complicated. There are decisions inside it that I’m sure were taken for a good reason, but that I can’t really understand why were not changed in the long run. Such as the decision to represent fields that are clearly strings using arrays with a single string element inside. Maybe it is future proofing for CRDT, don’t care, I’ve found the specification a chore to implement.

That means that my implementation was half-baked. Not only I was working with Racket—a language with which I’m nothing but a beginner—but I couldn’t implement all of the spec. That meant that some crucial parts of it like media upload were missing. I could create new posts on my blog, but they would only consist of styled text. That is not bad, but I enjoy uploading images every now and then.

Enter metaWeblog API, a blog posting API that is used by most of the old-school blogging systems (and also by some new ones) and that I know almost by heart having implemented a client for it all the way back in MacOS 9.

old iBlog client running on MacOS 9

iBlog public beta 7 running on MacOS 9 probably around 2001 or 2002

A client implementing the metaWeblog API uses XML-RPC to communicate with blog server. I love XML-RPC, I think it is terribly underrated and I’d rather use it in 2022 than add a truckload the size of Jupiter of complexity to my apps by using GraphQL or the new shiny RPC mechanisms. I simply don’t need them, they’re overkill for my use cases, I’m not Facebook. Anyway, I got frustrated with Micropub and decided to implement metaWeblog API support for my static-site generator. It took a bit less than a week to get everything running. At this very moment, I’m typing this message on the wonderful Mars Edit (a brilliant blogging client for macOS) using a rich native interface. I have my fingers crossed that when I hit Send to Blogthat it will actually work.

A shot of Mars Edit editing this very post.

A screenshot of Mars Edit showing this very post during my writing process.

This time I implemented the server using NodeJS. It is much easier for me to craft small toys out of JS. It is not as fun as doing the same stuff using Racket, but life is too short and I need this to work because I want to use my blog and not just develop my blog. It is so refreshing to be able to use a real native application to actually write on my blog. Using programmer’s editors such as VSCode and Sublime Text is great when you’re doing development, but I got tired of using those apps for posting to my blog. A richer interface reduces friction, posting becomes effortless.

For those of you reading, and coping with my various tests during the last couple weeks, I hope you won’t discount XML-RPC or metaWeblog API from your toolset. Choosing boring well-understood technology does wonders to one’s sanity. I’m already more productive with my blog than I was with Micropub. Even media uploads are working.

Feel free to reach out and ask me anything about this whole process. I want more people having fun blogging.

Did you enjoyed reading this content? Want to support me?

You can buy me a coffee at ko-fi.

Comments? Questions? Feedback?

You can reach out to me on Twitter, or Mastodon, Secure Scuttlebutt, or through WebMentions.

Mentions