Those that are familiar with micropub know that there's two ways to use the endpoint. One is as a regular json api and the other is a plain-old form submit endpoint. Almost all integrations these days are done with json apis, so the idea of support a form api seems antiquated at first.

But once you realize that any site can publish to your site, including file attachments(!), with a simple form on their website, it doesn't seem so antiquated after-all. It feels quite liberating. In fact, it may be my favorite part of micropub.

Currently regular json requests can create a post. And form requests with file attachments can also create a post. Tanzawa automatically inserts the photo into the post and does its exif stripping, lazy loading, and other image loading optimizations.

Testing with the Quill article interface - image attachments are sent in base64 encoded strings in the img tag. Extracting those images, saving them to disk, and rewriting the html will take me another day to complete.


Feedly is still mangling my posts. Besides the figure tag messing things up for feedly, another theory I have is that it doesn't like text content not wrapped in a <p> tag. Trix (the editor Tanzawa uses) wraps all content in a <div> tag and text is raw inside of it. I pushed an experiment to rewrite that <div> to a <p> tag in the RSS feed. Hopefully this fixes it.

Mangled posts in Feedly