Baker

UPDATE. My website uses newer software. This post is maintained for posterity.

This site is powered by my own IndieWeb-compliant publishing tool. It’s my home for all my notes, articles, bookmarks, photos and more, hosted on my personal domain rather than in someone’s silo. I can choose how it looks and works while having fun building it for myself.

I’ve been following the principles and recommendations of the amazing IndieWebCamp community who have discussed, documented and selfdogfooded the approaches I’m experimenting with here.

Features

  • Self-hosting using my personal, primary domain
  • Posting of all my notes, articles, bookmarks, photos, replies, reposts and likes directly on my site
  • POSSE syndication of my content to silos (e.g. Twitter) via Bridgy
  • Microformats 2 markup, including h-entry and h-card
  • Send and receive replies, reposts, likes and mentions using Webmention with backfeeding from silos
  • Reply/repost/like contexts fetched and displayed above posts
  • Authentication via IndieAuth and rel="me" links
  • Micropub posting as the primary method of creation for all post types
  • Webaction buttons to allow actions on Twitter directly from a post
  • Storage using text files in Markdown and YAML front-matter metadata

Micropub

Rather than build an admin system for creating posts, I’ve attempted to do without. Instead I’ve exposed an API endpoint that’s compliant with the (emerging) Micropub specification for posting using an authenticated third party app.

Using a tool like Quill I can authenticate with IndieAuth and then post notes, bookmarks and likes to my site. A successful post is stored on my server which then fires off any webmentions, syndications to Twitter/Facebook/Pinboard and fetches reply/repost/like contexts for display if appropriate.

Alternatively I can write (or edit) a post as a file and simply scp or rsync it to my server.

Webmentions

Instead of a comments form, my site supports replies, reposts, likes or mentions via Webmention from another IndieWeb site. If someone wants to respond to a post they can write their note on their own site using Microformats 2 h-entry markup and send a webmention ping to my endpoint.

Their h-entry will then be parsed, stored and added underneath my post with an icon indicating its type. Additional posts from the same permalink will update it.

And using the magic of Bridgy, responses to my tweets, Facebook posts and Instagram photos that have been syndicated from my site are pulled back in as webmentions.

Storage

All posts, webmentions and reply contexts are saved to disk as the primary method of storage. Files are then scanned, indexed and cached using MongoDB. These posts can be flushed and completely rebuilt from the raw files if needed.

Why the dual approach? I wanted the flexibility to rsync files to/from my server without worrying about database dumps and restores, but wanted the speed of a database to query and sort the data to serve as HTML. Also, with all content in flat text files, I’m confident that I could easily migrate to another platform.

Content is written in Markdown format with YAML front-matter metadata similar to Jekyll. For example:

–––
published: "2015-01-03 23:29:11 UTC"
permalink: "/2015/01/this-is-an-example"
post_type: note
tags:
- example
- personal
–––
This is an example post. **This is in bold**

Another paragraph

As well as previous articles, I’ve imported tweets and bookmarks that I’ve been posting since 2004. I now have all my own content stored on my own site.

Also

  • All pages and assets are served via SSL (https)
  • RSS feeds of new posts and webmentions
  • Auto-embedding of images and YouTube videos linked in posts
  • View posts by tags, e.g. indieweb
  • Monthly archive index pages
  • Navigate index pages using pagination

Using