Making the Wolog

The server you’re connected to right now is my custom blog server, the Wolog. It’s written in Rust, with Tokio, Rocket, and SQLX (connecting to Postgres).

Features

The Wolog is still in development - this page will be updated as features are added.

  • ✅ Core page rendering
  • ✅ User-facing searches and tag browsing
  • ✅ Feed generation
  • ⋯ Guestbook, Webrings
  • ⋯ Indieweb Microformats
  • ⋯ WebMention tx/rx
  • ⋯ Owner-facing API for quick “replies”, likes”, and “reblogs” of arbitrary webpages.

Page rendering

When I write software for myself, I prefer to write the smallest amount of code I can - why would I make my own tools for editing, uploading, and parsing posts, when I already have VSCode, SyncThing, and Pandoc?1 The Wolog looks in the post directory for Markdown files, calls Pandoc to convert them into an AST, runs them through some internal magic filters, and pipes them back into Pandoc to finally render to HTML.

The magic filters have access to the database, and are split into two stages: preprocessing filters run at reload-time, to make changes that solely depend on the post itself, before the post gets saved to the database, and postprocessing filters run at request-time, to make changes that depend on other posts, like filling out a feed block.

Feed generation

The Wolog has some primitive Atom feed generation now: the “search” page and the embeddable feed widgets link to a new /feed endpoint that accepts the same form fields that /search does. Feeds generated in this way are forced to use descending creation date sorting, and they’re hard-limited to 32 elements. Likes, replies, reposts, and notes are specially formatted here, as you would expect. RSS isn’t supported just yet, but I might add it later.

Guestbook, Webrings

I was born after these features had stopped being mainstream, but they always seemed really cozy to me, so I want to have support for them on my website.

I haven’t implemented it yet, but my plan for the guestbook is to use OAuth to get reliable proof of identity and prevent spam.

WebMention

Anyone trying to make a personal website is faced with a conundrum: most personal websites are intended to facilitate connection and communication, but static websites are tragically unidirectional. Accepting comments on your website can be a solution to this, but they raise moderation and security problems, and it’s difficult for your readers to see what you’re saying about other people’s work. I think WebMention is an excellent solution:

  • Readers can submit comments on your site by posting on an account they already have, without giving you the responsibility of handling anything secret.
  • There’s a higher barrier to entry for spam: you either have to post from another site and be subject to someone else’s moderation, or spin up your own site that specifically includes links to everywhere you want to spam.
  • All of your interactions live on your website, and all of your readers’ interactions live elsewhere.
    • This has obvious benefits to social connection, but it also lowers your exposure to legal risk if your readers post something outrageous: you aren’t actually hosting it, just linking to it.
    • If it does come to it, you can ban people at varying levels of granularity, all the way up to an entire domain.

  1. One of the Wolog’s ancestors was based on a Makefile and my custom webserver, wwebs, which I implemented with the barest minimum features I could think of for a webserver: if a file’s o+x bit was set, it would run that file with the path and headers as environment variables and use its stdout and stderr to generate the response. This version also had server-side pdf, epub, and podcast generation - maybe I’ll bring this feature back for the new version?↩︎


Created ; updated