Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gerwitz/sitewriter
Bringing IndieWeb to the JAM (Micropub for static sites)
https://github.com/gerwitz/sitewriter
indieweb micropub static-site-generator
Last synced: 3 months ago
JSON representation
Bringing IndieWeb to the JAM (Micropub for static sites)
- Host: GitHub
- URL: https://github.com/gerwitz/sitewriter
- Owner: gerwitz
- License: mit
- Created: 2018-03-03T14:27:02.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-18T20:38:20.000Z (about 2 years ago)
- Last Synced: 2024-10-15T07:12:35.450Z (3 months ago)
- Topics: indieweb, micropub, static-site-generator
- Language: JavaScript
- Homepage: http://sitewriter.net/
- Size: 333 KB
- Stars: 22
- Watchers: 4
- Forks: 0
- Open Issues: 52
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sitewriter
This is a small Sinatra service that provides publishing endpoints for sites that cannot provide their own.
The first use case is Micropub posting of notes to [my Middleman site](https://hans.gerwitz.com/) via GitHub.
Essentially, a configured domain has some _endpoints_, which receive content and apply _templates_ which are then sent to a _store_.
Authentication for configuration is provided via IndieAuth.com
I also use IndieAuth for the Micropub tokens. If you'd like to do the same, set the environment variable `TOKEN_ENDPOINT` to `https://tokens.indieauth.com/token`
## Post type heuristics
- If `mp-type` is defined, use it
- If `type` == h-event or `h` == event: event
- If `type` == h-entry or `h` == entry:
- If there is a `in-reply-to` value: reply
- quotation
- If there is a `repost-of` value: repost
- If there is a `bookmark-of` value: bookmark
- If there is a `checkin` or `u-checkin` value: checkin
- If there is a `like-of` value: like
- If there is a `video` value: video
- If there is a `photo` value: photo
- If there is a `audio` value: audio
- If there is a `name` value: article
- Otherwise: noteN.B. entries are flat. The value of a property may be an entry itself, but the "deeper" values will not be flattened for post type discovery.
## Credits
This was inspired by and initiated as a fork of Barry Frost's [Transformative](https://github.com/barryf/transformative).