assets | ||
content | ||
src | ||
templates | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
README.md |
Staticrustator (being workshopped)
After struggling with rewriting personnal website in a myriad of ways, all in some way unsatisfying, I have decided to write my own statis site generator.
Heavily inspired by Saait, since that is what I have been using previously.
To build
cargo build
and to create the website structure
cargo run
This will create the folder output
then you can sync to your vpc, or however you serve stataic files.
File organization
The posts are taken from posts/
folder, are structured as markdown files, with a front matter in yaml for the date, and title of the post.
Example:
---
title: Pantheon
date: 2024-03-03
---
# WATCH PANTHEON
## I DO NOT CARE WHAT DAY IT IS
### HERE'S YOUR PLAN
1. Wake up.
2. Open whatever device you watch things on.
3. Obtain, legally or illegaly, by any means necessary, 2 (two) seasons of Pantheon, created by Craig Silverstein based on short stories by Ken Liu.
4. Binge the 2 sesons in a single night (it is feasable I checked)
Thank you for coming to my Ted Talk.
Additional pages such as about
is also taken from there, however you could modify the about template in templates
folder.
Askama is a rendering engine based on Jinja, so it is rather straight forward to use,
but also it can take rust structs
to hold template context, which is very nice.
I have not yet integrated htmx into is, for faster loads of the post body,but that's for the future (also I hate js).