MWP (Mat's Wiki Project) is a static site generator for my personal wiki.
It renders a markdown tree into ready-to-serve HTML and builds a Pagefind search bundle from linked pages, so the final site can be hosted as plain static files.
Run:
cargo run -p mwp -- --helpOr install it locally from the repo:
cargo install --path mwp-cliThen use mwp ... directly.
cargo run -p mwp -- build --root /path/to/wiki --output distThe build command renders the wiki into dist/, writes shared assets, and generates the dist/pagefind/ bundle in one run.
Remote pages are cached in .mwp-cache/ by default, revalidated after 168 hours, and reused automatically on repeated builds.
Useful flags:
--cache-dir .mwp-cache
--cache-ttl-hours 168
--offlinecargo run -p mwp -- index --root /path/to/wiki --output dist/pagefindExample with cache controls:
cargo run -p mwp -- index --root /path/to/wiki --output dist/pagefind --cache-dir .mwp-cache --cache-ttl-hours 24cargo run -p mwp -- serve --dir dist --addr 127.0.0.1:4444(assuming your have a clone of my wiki or your own in under wiki/ in the parent folder)
Run:
cargo run -p mwp -- build --root ../wiki --output dist
cargo run -p mwp -- serve --dir dist --addr 127.0.0.1:4444