lucidiot's cybrecluster

Brainshit

Brainshit is my personal blog, with some occasional posts from other people I have given access to. My best friend used to write with me in the early years, but is now just an avid reader. Lord Vlad joined me there after we got to know each other through habitica.

Brainshit is now part of the cybrecluster.

History

Next rewrite

As per my cybrecluster rules, I want to move Brainshit away from PHP and MariaDB and use a static site. I wanted to do that long before I even thought about the cybrecluster. I had written a Python exporter that took in a MariaDB database export and generated Markdown files and some tar.gz archives for the features that I would drop during the transition.

I had considered at one point rewriting Brainshit in Python with Django, before coming up with the cybrecluster and deciding that Brainshit is simply not large enough to require something non-static. While I definitely am able to pull off that rewrite, I don’t want to host it.

I am struggling to find the static site generator that will allow me to make my transition. I was considering moving Brainshit further away from a blog and more into a wiki, but now that I have this wiki, this feels less relevant; these change of plans definitely slowed me down.

I have considered using Zola. It looked like Hugo, but nicer to use, and I now am the maintainer of its Alpine package. But after using it at work, I realized its Markdown parser is not CommonMark-compliant, and has many issues that are making it as uncomfortable to use as my current parser, PHP Markdown Extra.

Current planned design

I have been using pandoc for this website as well as on breadpunk, and maybe someday I’ll also use it on tilde.town, so why not use it on Brainshit as well?

That is a bit more complex to do because pandoc only handles a single document at a time. Existing pandoc-based static site generators feel too blog-oriented and not extensible enough to be interesting, so I am thinking of writing my own solution. To solve the issue of being able to create an index page or filter by categories, I’ll use oq, a wrapper around jq that can parse YAML, to parse the YAML metadata of each file and either generate the HTML directly or send that as more YAML metadata to pandoc with a special template.

Using pandoc fixes the main problem that I currently have with my site: the Markdown support is pretty poor and I find myself needing more and more out of Markdown with each of my posts. I might end up relying on pandoc privately and just sending its generated HTML to my blog’s admin page until I do the rewrite, so that I can avoid the poor PHP parser.

Comments

It took me a while to decide, but I chose to just not include comments at all in the next version of Brainshit. It will just be articles, and that’s all. We got very few comments, half of those were spam, and replying was hard since there were no email notifications. If we want replies, we’ll just publish our email addresses or other contact info. This makes a static site much easier to consider; the few solutions available for comments either require me to host another service that gets backed by a database somewhere, and the whole point was to remove the dependency on binary files, or require me and the readers to have GitHub accounts, which is not acceptable considering the fact that GitHub is an American company, owned by Microsoft, and makes questionable choices regarding its clients.

Article ideas


Licensed under Creative Commons Attribution 4.0 International Generated on 2022-09-25T22:53:18+02:00 using pandoc 2.9.2.1