Skip to content

ae2rs/blog.rs

Repository files navigation

blog.rs

CI License: MIT Rust

Live: decastro.dev · ae2.rs

Public repository for my blog, fully written in Rust. The server is built with Axum, templates are rendered with Maud, and styles are generated with Tailwind during build.rs.

Features

  • Axum server with Maud templates
  • Markdown content rendering
  • Syntax highlighting via syntect
  • Embedded static assets
  • Tailwind CSS build pipeline

Project layout

  • main.rs: server entry point and routing
  • src/: library crate with page handlers and templates
  • styles/index.css: Tailwind entrypoint (compiled to build/style/index.css)
  • build/: static assets served at runtime (e.g., build/img and build/style)
  • content/: blog content source files

Quickstart

cargo run

Then open http://0.0.0.0:3000.

Local development

Use the helper script for automatic restarts while you edit Rust, content, styles, or assets:

./scripts/dev.sh

If cargo-watch is installed, the script uses it. Otherwise it falls back to a small polling watcher.

Build

cargo build

This runs build.rs, which generates the minified Tailwind CSS using the binary in vendor/tailwind/.

Test

cargo test

Lint

cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings

Docker

docker compose up --build

License

MIT. See LICENSE.

TODO

  • View transitions support for the navbar
  • Caching headers
  • About section for the blog itself
  • Notes (tiny posts) support
  • Analytics

About

My blog, made from scratch in Rust!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors