moat

Markdown + oat. A static site generator in one Go binary.


Zero config

Built-in oat layout with sidebar nav, dark mode, and syntax highlighting. Just write markdown and build. No layout files needed.

One binary

Single Go binary. No Node.js, no npm, no Ruby. go install or grab a release binary.

Syntax highlighting

70 Chroma themes with automatic light/dark mode. Configure in config.toml — CSS classes, not inline styles.

Layouts & shortcodes

Multiple layouts via Go template block/define. Shortcodes for reusable components in markdown. Like Zola, without the complexity.

Quick start

go install github.com/oddship/moat@latest
mkdir docs
echo "# Hello" > docs/index.md
moat build docs/ _site/
moat serve _site/

What it does

Reads markdown files from a directory, converts to HTML, wraps in a layout template, generates sidebar nav, writes static HTML. That's it.

docs/
├── config.toml           # Site config (optional)
├── _layout.html          # Custom layout (optional)
├── _shortcodes/          # Reusable components
├── _static/              # Copied as-is
├── index.md              # → /
└── 01-guide/
    ├── 01-intro.md       # → /guide/intro/
    └── 02-config.md      # → /guide/config/

Ships with a built-in oat layout — sidebar, dark mode, semantic HTML. Or provide your own _layout.html with any CSS you want.