Switching to BSSG
When I resurrected this blog some years ago, I switched to Hugo using Netlify to host it. That worked, but it seemed unnecessarily difficult for a static site as soon as any customization was required. I could never work out exactly where the code for the template was actually stored.
As part of trying to reduce dependency on US 'Big Tech', I now have a VPS that can serve the blog. Since it was just a static site anyway, moving it was trivial. I thought I would update the version of Hugo at the same time, since the version I had been using was very old. I gave up. The new Hugo didn't work with the existing templates. Trying to work out how to convert the existing site to work with updated templates was taking far longer than I wanted to spend on it.
Then via Mastodon, I chanced on BSSG by Stefano Marinelli. A simple static site generator written in Bash. It just reads markdown files and creates a static site from them. There are multiple themes available. It has very few dependencies, and I can see where everything is and how it works.
I wanted something to edit the markdown files to help manage the posts. BSSG does have a standalone, in browser editor which looks quite nice but not really what I wanted. Since the posts are just a directory, or actually a set of subdirectories, containing markdown files, I can use Obsidian for writing the posts. I can then use some of Obsidian's plugins for things like spell checking and get a nice editor for the markdown.
- The Obsidian vault is set to the root directory of the BSSG site.
- The 'Hide Folder' Obsidian plugin is used to hide the output directory from Obsidian.
- The whole site is stored in git (self-hosted Gitea) and the Obsidian Git plugin makes committing changes simple.
- Post build script publishes the blog.
So far, there are two things that I have not got working as I would like.
- Tags - Obsidian uses a different YAML format to BSSG. It seems BSSG wants the tags comma separated, butt Obsidian writes them out as a YAML list with one per line.
- Images don't appear in Obsidian. BSSG wants the file path to start with a / (eg /images/picture.png) but Obsidian treats this as an absolute rather than relative path, wanting (images/picture.png)