Mountable Mars middleware for static site generation
Dependencies
deps: mars + markdown + luna (no edge to sol)// moon.mod.json
{
"deps": {
"mizchi/astra": "0.20.0",
"mizchi/mars": "0.3.10",
"mizchi/luna": "0.20.0"
}
}moon install mizchi/astra/cmd/astra # → $MOON_HOME/bin/astra
# or via npm
pnpm add -g @luna_ui/astra # 0.20.0# Static dump (writes <out>/<url>/index.html for every page URL)
astra build --out ./dist
# Dev server against the current directory's docs/ tree
astra dev --port 3000import "mizchi/astra/middleware" as middleware
import "mizchi/mars" as mars
async fn main {
let cfg = @astra.SsgConfig::default()
let mw = @middleware.create(cfg, cwd=".")
let app = @mars.Server::new()
app.all("/*", mw.handler())
app.listen(port=3000)
}Mountable Mars middleware for static site generation
Dependencies