Jonathan Frederick's Blog

Blogs and blogc

I like to read blogs and articles online. Here are some of my favorites in no particular order:

Anyways, I've been floating the idea of writing my own blog recently, and now I'm giving it a shot! This blog will focus on whatever open source software I'm currently using, and what I'm doing with it. For now, lets talk about how I got this blog up and running.

The first step I took was to figure out what blogging software to use. I didn't want some bloated JavaScript mess that ran slow on devices or servers. I wanted a simple, static website that could be served quickly and displayed properly on a good range of devices.

ssg was a early contender, since it was very small, simple to use, and ran almost entirely with Bourne shell scripting, but it ended up not suiting my needs once I started building this blog. It wasn't possible to easily stitch multiple blog posts together on one page. You had to keep each blog post on it's own webpage, unless you wanted to copy everything onto one page on your own. It still is a great simple static website generator for other projects, so feel free to give it a try if you want, it's definitely in consideration for any future websites I create.

Afterwards, I spent more time looking for another website generator and found blogc, a blog compiler written in C. blogc isn't a full blogging engine out of the box, it can only compile individual webpages. You need to use Makefiles or something similar to build a proper blog. Thankfully there is a decent example blog that you can use to get started easily. In my case, I ripped out the included jquery and bootstrap code, and rewrote the templates to work well without them, plus adding some CSS of my own. The included Makefile works very well, and only needed minimal modification (mostly rewriting where files are located).

Now I need somewhere to host this blog at. I wanted to use an OpenBSD server with their httpd daemon to host this blog. This is because I want to try something different from what I normally do, which is use the Apache web server with a server distribution of Linux, like CentOS. Thankfully, the man pages in OpenBSD are nothing short of excellent, and Roman Zolotarev has great posts on how to configure httpd and enable HTTPS with Let's Encrypt.

I also needed a good VPS provider that supports OpenBSD (my home connection is pretty terrible), and Vultr fits the bill perfectly! For now I don't need a loadbalancer (especially for a personal, static blog), so people will be fetching webpages directly with the httpd daemon on 1 server.

Now we are here, I have a decent looking and easy to edit blog that is running on OpenBSD using httpd! I'll have some other interesting posts up here soon, so keep your eyes out for new posts!

You can find the source code for this website at GitHub, feel free to open PR's for any spelling or grammar issues, or even if you want to add another blog to the list above.

Author: Jonathan Frederick
Published on: Aug 24, 2019, 02:15 AM PST
Permalink