Self-hosteable Micropub endpoint that publishes to Jekyll by committing to GitHub
JavaScript
Latest commit f27f2a3 Feb 14, 2017 @voxpelli 0.4.4
Permalink
Failed to load latest commit information.
lib
test
.editorconfig
.eslintignore
.eslintrc
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
app.json
package.json
sample.env
yarn.lock

README.md

Micropub to GitHub

Build Status Coverage Status Dependency Status

An endpoint that accepts Micropub requests, formats them into Jekyll posts and pushes them to a configured GitHub repository.

Enables updating ones Jekyll blog through Micropub-supporting tools such as Quill and even through some experimental iOS-flows.

The Micropub protocol is part of the IndieWeb movement.

Requirements

Requires at least Node.js 6.0.0.

Setup

On Heroku:

Deploy

Elsewhere:

Install it like a normal node.js application and adds the needed configuration through environment variables, either by copying the sample.env as .env and filling the values in there or by setting them through any other mechanism.

Yarn-support

This project contains a https://yarnpkg.com/ lock file which is a faster and more secure alternative to the npm client.

Micropub endpoint discovery

After a successful deploy the standard endpoint can be found at the /micropub/main path where you deployed the application, like eg. https://example.com/micropub/main.

If you specified more than one site by using the MICROPUB_SITES_JSON variable, then each one of those will be available under the name of their key like /micropub/key-name.

You need to add proper discovery for your Micropub endpoint as well as your token endpoint to your site to enable tools to discover what endpoints it should talk to.

Current status

Early alpha

Supported:

  • Creation of posts
  • Uploading of media
  • Replacing an existing post with a new version

Unsupported:

  • Partial update
  • Deletes

Configuration options

See the sample.env file.

Modules used

  • micropub-express – an Express Micropub endpoint that accepts and verifies Micropub requests and calls a callback with a parsed micropubDocument
  • format-microformat – a module that takes a micropubDocument as its input and then formats filenames, URL:s and file content from that data to a standard format which one then can publish elsewhere. Currently supports just a single Jekyll format.
  • github-publish – a module that takes a filename and content and publishes that to a GitHub repository. A useful place to send the formatted data that comes out of format-microformat to publish it to a GitHub hosted Jekyll blog like eg. a GitHub Pages one.

Related