A new home for computerBear
After 2 years of inactivity, this blog has migrated to blog.bearcats.nl from it’s original home at Github Pages.
I’ve recently started moving a lot of my online stuff away from “free” services like Github and Google Drive, and into my new self-hosted server setup. I replaced Github with my own Gitea server, Google Drive with my own Nextcloud server, Last Pass with my BitWarden server. Finally, I moved computerBear away from Jekyll and Github Pages into a fully custom setup.
The blog is now served directly by Nginx, and it’s powered by a new blogging engine that I wrote specifically for computerBear. I’m very happy with this transition. The old setup had a couple of flaws that prevented me from writing as many blog posts as I would have liked. This new setup is incredibly easy to use, and I hope it will also end up being much easier to maintain in the long run.
Problems with Jekyll#
Jekyll and Github Pages is a perfectly fine place to run a blog. You get to host your blog on Github “for free”, and Jekyll worked just fine. My problem with Jekyll is that it’s an incredibly complex solution for a very simple problem.
I just needed something that compiles markdown files to HTML, and links them together in an index. Jekyll does that, but it also does a lot more. It comes with a built in web server, custom markdown syntax, plugins, sass, lots of knobs to configure… I don’t need any of these. It’s also written in Ruby, and I never have that installed on any of my machines. It’s basically a dead language, whose entire runtime I have to lug around just for Jekyll.
A couple of times over the past 2 years, I would get excited about a new idea for a blog post. But then I would realize that I had completely forgotten how to use Jekyll, and that I no longer had any of it’s dependencies. And then I concluded that I don’t have 30 minutes and 500 MB of disk space to spare for Jekyll, and just gave up.
And at the end of the day, the most damning thing I can say about Jekyll is that I replaced it with 400 lines of Python that I wrote over a weekend.
Make it yourself#
I was talking with Subha one night, and we were discussing the bloated state of the web. Jekyll came up, since we both used it. He mentioned that he had also gotten tired of it, and wrote a custom blogging engine himself. This was the motivation I needed to push forward with my own custom solution. His site generator, Selket, can be found here by the way.
Following his advice, I wrote a custom blogging engine specifically for computerBear. It works exactly how I want, and weighs in at only 400 lines of Python code. Unlike Ruby, I always have Python on all of my machines, so this is a dependency worth taking in my case.
The benefits#
The new workflow is incredibly simple. My blogging engine monitors a special directory on my Nextcloud server. Every time something changes in that directory, the blog is incrementally recompiled, and it’s immediately live. So now I can just write a new blog post directly from Nextcloud’s built-in WYSIWYG markdown editor, and I can do that from any computer with an internet connection, even from my phone.
When I want to do something more complicated, or to verify that everything looks correct before the post goes live, I can pull my blogging engine on any of my machines, and I don’t need to install any dependencies to make it work.
Additionally, I can fully customize markdown syntax to make it natively support all the features I like to use frequently, such as <kbd> tags. I also completely restyled the CSS, and in my humble opinion, the blog looks great. I also compile LaTeX formulas directly into the HTML using KaTeX, so you no longer have to enable javascript and give up a bit of your privacy just to see equations on my blog.
Overall, I’m extremely happy with the results. I hope that this encourages me to write more posts, and that the reading experience has improved.
Conclusion#
I guess the lesson is, don’t cargo cult yourself. If the existing tools out there seem too complicated for your use case, just build a quick-n-dirty one that does exactly what you want and nothing more! It will make you happier in the long run.