Blotpub - Micropub Endpoint for Blot
There was one final piece of puzzle missing, one that I had posted in a recent update on the theme refresh.
Why not make this the primary homepage? Well, I am still on the journey of indiewebifying this place. I still post to my site using other apps, mainly Quill and Micro.blog. Until I get the micropub endpoint that I am working on done, I will keep this place booked for my excursions, my experiments.
Well, I finally managed to get a basic version of one worked out. Basic, but a workable version. Introducing Blotpub.
It is a self-hosteable Micropub endpoint for blot.im and Dropbox. It accepts Micropub requests, creates a simple Blot posts and saves them to a configured Dropbox folder. This enables updating a Blot blog through a Micropub client.
I have tested creation of both long and short posts via Quill. It supports creation of posts with or without titles. For me, the former are my micro posts while later are more of the long form articles.
It also supports metadata creation for tags and slugs as part of the post documents.
With this, I have my basic needs covered. Most of the time, I am posting text posts; the current version should be able to handle that.
Next, I need to handle the creation of like and reply post types and also handle the image files. It may so happen that I end up getting these done soon. However, I wanted to put the bare bones version out there.
How do I use this?
- Install: Just install this as a normal Node.js application. A better way would be to deploy directly to Heroku.
- Grant Dropbox Access: Generate a Dropbox access token from the Dropbox App Console to grant the application access to your Dropbox folder. You will need this token while configuring your application.
- Configure: Add the required configuration values via environment variables or the Heroku app deploy dashboard. You will need the token generated above.
- Endpoint Discovery: Once you have deployed the application, your Micropub endpoint will be available at
https://example.com/micropub). To enable automatic discovery for your Micropub endpoint and token endpoint, you will need to add the following values to your Blot site’s
<head>- usually available in the
head.htmlfile in your theme/template.
<link rel="micropub" href="https://example.com/micropub"> <link rel="token_endpoint" href="https://tokens.indieauth.com/token">
You should now be able to post to your Blot site from external Micropub clients (like Micro.blog iOS App, Quill etc). If you do use this, ping me. All your feedback is welcome.