I built my personal blog in Rust in a weekend, since I've heard it's a great way to learn a programming language. That weekend I got the HTTP server, template engine, and everything else working.

I made a list of features I wanted, investigated the libraries I wanted to use, defined the project structure, and then built the entire thing.

Some of the features

About the template engine, which uses markdown but allows HTML embedded on it, usually I would be careful with allowing HTML like that but I would be the only one writing blog posts. And I love the flexibility.

I also used axum for the server itself, which was stupidly easy to implement. with a RSS feed for blogposts for those who still use RSS like me.

As for some other details, I added a sitemap, robots.txt, and a privacy & cookie policy page; any normal website should have these. The policy is ~10 lines. For professional work I'd write a real one and check with a lawyer, but this is a personal blog.

There's that 2D-3D thing on the hero page, I call it SMW2-Island (a Yoshi's Island intro inspired animation). I wanted visual candy for the hero page, since the first fold is the most important part of the website. I won't go into detail here since I'll make a separate post about it.

I also added two easter eggs, both are cats, because you are on the internet.

It's damn small

Another interesting part about this project, it's the CSS of all things. I always work with libraries and CSS systems designed to scale to infinity. This project was different and I worked on it like I used to back when I learned CSS.

Here it is:

static/css/
  ├── 1-core/
  │   ├── _animations.css     194 B
  │   ├── _base.css          1.1 KB
  │   ├── _layout.css         360 B
  │   └── _typography.css     948 B
  ├── 2-components/
  │   ├── _admonition.css     747 B
  │   ├── _back-to-top.css   1.4 KB
  │   ├── _contact.css       6.6 KB
  │   ├── _footer.css        2.3 KB
  │   ├── _header.css        1.2 KB
  │   ├── _snippet.css        931 B
  │   └── _tags.css           711 B
  ├── 3-pages/
  │   ├── _about.css         4.0 KB
  │   ├── _blog-list.css     2.5 KB
  │   ├── _blog-post.css     3.9 KB
  │   ├── _home-hero.css      637 B
  │   └── _simple.css         362 B
  ├── catppuccin.css         3.6 KB
  └── style.css               822 B

This, at least for my usual work with CRMs and similar, is tiny. I forgot I used to really enjoy writing tiny, compact CSS like this.

While we are talking about how tiny the CSS folder is, how about the rest? The actual logic is ~37 KB of Rust, compiling to a 6 MB binary. The Docker image adds ~8 MB of Alpine Linux + libs and 5 MB of static assets, ~20MB total.

You'll be able to check the code in my git server soon enough, and if I'm not wrong, you should be reading this on the website itself.