- Rust 98.9%
- HTML 0.5%
- CSS 0.5%
| example | nested wmscripts, AND parsing optimizations :O | |
| src | ignore index.html by default in macros and rss | |
| .gitignore | nested wmscripts, AND parsing optimizations :O | |
| Cargo.lock | nested wmscripts, AND parsing optimizations :O | |
| Cargo.toml | nested wmscripts, AND parsing optimizations :O | |
| justfile | fetch, formatting, added some better error handling | |
| README.md | update readme | |
webmk
a simple static site generator written in Rust.
"dude... seriously?"
Yeah, seriously. Look, I know everyone and their grandmother has written a SSG already, but I needed a good project to stretch my Rust muscles, and creating a SSG seemed just hard enough to where I could probably pull it off. Also, I've been meaning to renovate my website, and writing a SSG to do generate the new one just seemed like so much more fun than using one that's already available xP
"so what's so special about it?"
Not much. It uses Markdown as its input file format, is template based, and has a custom scripting language you can use to insert "dynamic" content into your pages at compile time. For example, this-
this page's filename is @{get file.name}!
@{get self} compiled this site at @{get time} on @{get date}.
turns into this-
<p>this page's filename is index.html!</p>
<p>webmk v0.1.0 compiled this site at 18:22:51 on 5/6/2635.</p>
There's also a macro feature! Notably, this can be used to provide directory listings on a page.
@{macro ls}
<p><b><a href="hi.html">hi</a></b>: i'm a page</p>
<p><b><a href="dir/">hello</a></b>/ - i'm a directory!</p>
"how do i use it?"
The example site demonstrates a lot of webmk's functions, so check that out if you want to mess around with the SSG before the docs are done.