A Micropub server that accepts Micropub requests and creates and publishes a Jekyll/GitHub Pages post to a configured GitHub repository. This server supports posting to multiple sites from the same server. This project is inspired by Micropub to GitHub, a Node.js implementation.
Fork this repo (optional), configure and then clicky this button :point_right:
Clone the repository and run bundle install
.
Run GITHUB_ACCESS_TOKEN="your_personal_access_token" bundle exec rackup
and you'll have the application running on http://localhost:9292 .
Alternatively, create an env.rb
file in the root of this repository containing: ENV['GITHUB_ACCESS_TOKEN'] = 'your_personal_access_token'
.
Once deployed, your Micropub endpoint can be found at /micropub/<sitename>
e.g. https://example.com/micropub/mysite
.
<sitename>
is the site-specific section on your config.yml
file.
To enable automatic discovery for your Micropub endpoint and token endpoint, you will need to add the following values to your site's <head>
:
<link rel="micropub" href="https://example.com/micropub/mysite">
<link rel="token_endpoint" href="https://tokens.indieauth.com/token">
Copy config-example.yml
to config.yml
and customise to your :heart:'s content. See the configuration docs for full details.
You can customise the layout and format of your posts by modifying the templates in the templates/
directory. These are written in Liquid like Jekyll themes.
Syndication is available via Brid.gy.
Run bundle exec rake test
to run through the full test suite and bundle exec rake standard
for Standard linting.
Want to contribute to this project? Great! Fork the repo, make your changes (don't forget to add tests 😉) and submit a pull request.
Micropub to GitHub Pages is licensed under the MIT License.