Rendering Micropub Client Data on Posts
Aside from blog posts, like this one, content I publish to my site is using the open standard Micropub, which I've supported since last August.
Being an open standard means there are lots of client implementations, so I'm free to use various different Web/mobile apps to interact with my site.
When I set this up, I did something I quite like, which is to make it so any new content created contains details of which Micropub client created it (the client_id
).
Up until now, I've been showing this client_id
, which is a URL such as https://indigenous.realize.be
, but that may not be super meaningful to the reader.
A while back, I noticed that Jacky has some nice rendering of which client published - you can see an example on this note for the same client mentioned above, Indigenous.
If you've visited my site since last night, you may notice that I'm also starting to do this now:
I'm hoping that this may make it slightly nicer to the reader, although I'm wondering if there's anything I can do to make it better.
So how am I discovering this client metadata?
IndieAuth defines the h-app
markup using Microformats2 for this purpose, which is great! It is optional for clients, which means I have to still make it possible for a client not to provide it, but for those that do, it so far contains all the information I need to make the metadata more useful.
I've decided to make this a manual process to update the metadata, for now, so I'm not making my site's build reliant on the services to be available so I can retrieve their metadata.