Blog fully migrated to Obsidian
Last weekend I finally finished my great blog refactor v6! It is such a relief and good feeling, that I really want to share it here.
TLDR; is now better integrated into Obsidian. This enables to move articles around, use wikilinks and wikilink-style images and benefit from the knowledge graph.
As I side effect, I discovered and pulled aside collections of articles on event sourcing, opinionated tech and robotics. All that done is done mostly without breaking any existing (and very messy links) 🙂
Here is how the website currently works.
I write my blog posts in Obsidian. When there is a time to publish, Python script runs. It will:
- Grab all markdown files and extract YAML-frontmatter from them. YAML contains just a few config entries:
uid- unique auto-generated id;
title- in case I want to have special symbols in the title;
url- canonical (latest) url for the article.
- Run markdown through
Pygments(for code snippets).
- Run through wikimedia link parser to convert links like
[[2017-12-17 Black Friday load|Black Friday]]to proper
- Generate static html, wrapping markdown content with an html layout (
url_map.tsvand generate redirects from various url versions to current canonical representation.
rsyncresulting folder to a remote server.
Caddywill serve it there.
That code used to be open source, but unfortunately isn't any more. Codebase is currently a mess 🤷 and is going to get even more messy. I want to bring back the comments and flatten the stack. That will require another rewrite.
Did you know that automatic HTTPS from Caddy is available as a golang library?
However, if you are interested in blogging, setting up a blog or just writing in general, please don't hesitate to reach out to me. Writing is an important part of staying connected, productive and healthy in a remote-first culture. I'd be glad to help! ✌️ ❤️
Published: September 19, 2022.