--- title: How This Site Works categories: - technology published_date: "2022-05-13 14:22:13 +0000" layout: default.liquid is_draft: false --- # How This Site Works Decided to just make a quick post to go over how this site is made and updated. ## Technical Stuff I've gone through a few iterations, all the previous times I would just hand write HTML and CSS, which worked, but was annoying if I wanted to change stuff. So this time I decided to switch to a static site generator, [Cobalt](https://cobalt-org.github.io/). It's pretty nice, and written in Rust too. It was kind of hard to figure out how to do some stuff, since the docs kind of suck. But eventually I figured it out and now it works well. Pages are Liquid templates (kind of like HTML), which I only need to edit if I want to change layout stuff, and I don't do that very often. Styling is done with SCSS, which compiles down to plain CSS. It's *really* nice to work with, especially since I can keep stuff separated into different files. ## Updating All the posts & pages are just written in simple Markdown, which makes it nice to write and edit just the content. Once I've updated it, I simply run an rsync command to update it on both servers. I have a VPS I use for the main site (owned by one of my partners), and a Raspberry Pi 3 I use for the onion site mirror. I also have it stored as a git repository, as a backup, and so that people can look at the code for reference. To make a new blog post, I simply run `cobalt new "Name" -f posts`, and cobalt will create a new Markdown file for me, in the posts directory, with all the metadata. I then open it up in Neovim, and start writing. At the end I'll enable spellcheck and fix the many mistakes I've made. I can then run `cobalt publish posts/Name.md` and it'll rename the file, and add a published date to the metadata. I then just run the rsync command, and it's live on the site!