Posted on

Why Build This Blog?

In recent years, big internet companies have siloed huge swaths of the internet into their platforms, all in the name of capturing every bit of data from our interactions and selling it for a huge profit.

I'm a firm believer in taking ownership of one's information presence online and being in control of the data that is created and shared. This blog is my attempt to not only express myself, share my personal projects, and let others know about who I am, but also to learn the various technologies of the modern web to enable my own digital soverignty.

Finding a Framework

My background is in electronic hardware and embedded systems, and so the code that I tend to write is either low level systems programming (C/C++) or scripting (Python). Even though Javascript is the language of the Web, I don't know how to write it. I also take issue with its many known quirks and security vulnerabilities in many JS packages and frameworks.

// JavaScript being... itself
>>> [1, 2, 3, 15, 30, 7, 5, 45, 60].sort()
[1, 15, 2, 3, 30, 45, 5, 60, 7]

These were a few of my design goals:

  • minimal tooling (compiled single binary a plus)
  • small attack surface (memory safe language a plus)
  • statically rendered
  • easily customizable, but opinionated
  • responsive / works well on mobile
  • existing themes that look good

This is a good job for a static site generator and I had a lot to choose from. I started with Next.js and worked through some tutorials. While I like the power of React components and its ability to use Typescript instead of Javascript, I eventually ran into security issues in dependencies that I didn't know how to resolve. I decided to try my hand at Hugo instead.

The Hugo framework and it's templates are written in Go, and there are many great themes to support it. The project has an active community and lots of examples. I used Hugo to build my other website Jacana.io.

I didn't want to limit myself to just a single framework, however, and was interested in finding one built in Rust to make this site. Rust is another systems language I'm interested in learning, and I wanted to use projects that would eventually allow me to contribute to its ecosystem. Once again I browsed Jamstack, and found MdBook and Zola. MdBook looks really nice, but it's meant for documentation and books more than blogs and personal sites. That left Zola.

Zola (né Gutenberg)

Zola does everything I need, in Rust, with an active community, and lots of themes to choose from and modify. The content is written in a strongly defined version of Markdown called CommonMark, and it uses a template engine called Tera. So far I'm really happy with it and found it quite easy to get started.

Hosting (and VCS)

I'm not at the point in my skillset where I feel comfortable hosting a website on my own self-run infrastructure, and so I decided to go with a hosting service, but one that promotes open-source software and respects my privacy. Free hosting would also be a nice perk.

One of the cool features of both GitHub and GitLab is that they can host the Git repository, build static assets, and host them on their own servers and CDNs, all automatically and triggered by a push from my laptop. They both also support custom domain names and automatic provisioning of SSL certificates with Let's Encrypt, all for free.

I went with GitLab since they allow their service to be self-hosted much easier than GitHub, and they also aren't a Microsoft subsidiary. You can check out the source for this site here. Unfortunately, due to a pretty lame bug, I had to wait a week to set up the build pipeline but eventually got it working. C'est la vie.

Conclusion

The technology stack involved in getting my ideas onto your screen is immense -- from the tools that build and format the content, to the servers that host it, to the protocols that serve it, it makes sense why paid services exist to make this stuff easier. I'm clearly not so much of a purist as to avoid using other peoples' computers, but I would if I could and hope to eventually.