A custom, lightweight Static Site Generator (SSG) built entirely in Rust. It converts Markdown files into static HTML pages, designed for simplicity, speed, and easy automation with Markdown-based note-taking tools like Obsidian.

The repository is organized into four distinct directories:
content/: Contains the raw Markdown (.md) files. Theblog/subdirectory is processed dynamically, while root files likeindex.mdare handled manually.src/: Contains the core Rust engine responsible for site generation.static/: Houses all static assets, including CSS stylesheets, images, and favicons.templates/: Contains the HTML layout structures, such asbase.htmlandblog_list.html.
The generation logic is separated into four key Rust modules:
main.rs: The main execution point. It creates thepublic/output directory, copies static assets from thestatic/folder, initializes the template engine, and triggers the build process for both the standalone pages and the dynamic blog section.blog.rs: Handles the blog content pipeline. It iterates through thecontent/blog/directory, extracts the first#heading to use as the post title, generates individual HTML files, and compiles the main blog archive index.models.rs: Defines the data structures. It contains theBlogPoststruct (holding the title and slug), utilizing Serde to pass serialized data to the template engine.utils.rs: Contains essential helper functions. It includes a recursive directory copy function for static assets and a universalbuild_pagefunction that parses Markdown into HTML and injects it into the templates.
The project uses a template engine to maintain a consistent layout across all generated pages. The base.html template acts as the main wrapper, accepting raw parsed HTML via a {{ content | safe }} tag and dynamically resolving relative paths for CSS and images using a {{ root_path }} variable.
- Prerequisites: Ensure you have Rust and Cargo installed on your system.
- Build and Generate: Run the following command in the root of the project to compile the Rust code and generate the site:
This will process everything and output the final, ready-to-deploy HTML files into the
cargo run
public/directory.