Creating an Auto-configuring Micropub Client

Featured image for sharing metadata for article

Micropub is an awesome standard, and I've really enjoyed building for it. The best thing about using an open standard is the abundance of clients.

But one thing that has made it slightly painful to use is where I want to do things which are more me-specific than the general-purpose functionality that most clients implement.

Although I'm hugely appreciative of the community and their work they rightfully so don't support the special workflow I want for my own site. This was partly what led to me creating my own personal Micropub client.

Something that particularly interested me in the Micropub community extensions is the ability to query the server for supported vocabulary. Although most folks had been looking at this as a way to disable certain parts of their rich editor, I've been thinking about it slightly differently.

I'm more interested in making it possible to auto-configure my editor for everything that my Micropub server supports. This means that I no longer need to either add support to existing clients, or update my editor at the same time as I update my Micropub server.

I've now set this up on my editor, which lists the Micropub post types for my staging/production server (in case they're different):

A screenshot of a listing of all the post types that are supported on Jamie's staging server

And then allows providing the properties for that specific type, such as photo:

A screenshot of the fields possible to be used with a photo post, with an asterisk denoting a required field

I'm really looking forward to using this a little more, and building new post types that are more me-centric.

So now I've got that set up - what's next? Currently, I don't really have a super helpful user experience - you can see they're just plain text boxes.

I'll be adding support for providing a hint to a client what a property does, such as whether it's a date, URL, or can be looked up from the result of a query.

I'll also be making it look a bit nicer - it's currently very much MVP as I'm the only one using it, and I don't exactly mind a poor UX if it's something I'm using.

Another thing to note is that I've only implemented this as a form POST request for now, so some types of post may be more difficult to post.

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0. #micropub.

Also on: IndieWebCamp logo logo

This post was filed under articles.

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.