back

How I made this blog

The Rust part

source code
The Rust code does the following:

The rust program handles the http sites as Strings, I use .replace() on them to put the parts together like Lego. It is most certainly not the de facto correct way, but it works. It really could not be any simpler than that. I edit the markdown input files with Obsidian.

From the contents of the pages put into the html template (or "bracket" if you will) to the href in the button everything is just .replace(). I have yet to shoot myself in the foot with it, so until the day comes, I will not change it. Html is just text after all, what could go wrong...

I plan on expanding this to automatically order the entries on the main page based on some timestamp, but I leave it as a plan for now.

Continuous Deployment

The site used to be hosted on GitLab, but I had trouble hosting it without logging in.

GitHub allows us to write scripts that will be ran on each commit (.github/workflows/*). On committing to the main branch (depends on setup), a script will be ran, where the rust parser runs, then a bash script copies the content of the output to the public directory.

It is in two stages, the first one is the build stage, the later is the deploy. They are in separate stages for modularity (mainly).