The miso 🍜 website.
- Fully static. A
prerenderexecutable (vanilla GHC + miso'sssrflag) renders every route topublic/<path>/index.html. The same code compiles to WebAssembly and hydrates whichever page was loaded, then takes over navigation withMiso.Router. - One dependency. The site depends on
baseandmiso(plus thedirectoryboot library in the generator). No servant, no aeson, no markdown — the docs are HaskellViews, the syntax highlighter is a small Haskell tokenizer, and JSON/SEO artifacts are printed by hand. - Everything is a component. Each page is a keyed
Componentmounted with(+>); the docs shell receives the current route as props; the language (with a translation table), and the theme live on the app-global context, persisted tolocalStorage. - Live docs. Documentation pages embed running examples next to their
source.
bun scripts/check-demos.tsverifies the displayed source is exactly the code that executes (seeshared/Site/Demos.hs).
assets/logo/ the lambda logo (SVG + rendered PNGs, OG images)
client/Main.hs WASM/JS entry point (misoWithContext + hydration)
server/Main.hs static site generator (HTML, sitemap, RSS, manifest, motion.css)
shared/Site.hs root component: top bar, router dispatch, footer
shared/Site/ pages, docs content, demos, i18n, search, styles
static/ style.css, index.js (WASM loader)
scripts/ check-demos.ts
Everything runs through the flake (only nix required):
make # build WASM + prerender all pages into public/
make serve # http-server public/ → http://localhost:8080
make watch # hot reload via the WASM browser GHCi
make js # GHC JavaScript backend instead of WASMTo develop against a sibling ../miso checkout instead of the pinned
release, pass PROJECT=cabal.project.dev:
make PROJECT=cabal.project.dev build prerenderpublic/ is a plain static site. Every route is a real directory with an
index.html, so any static file server works:
http-server public # or: netlify / cloudflare pages / nginx / s3 …Configure your host to serve 404.html for unknown paths.