A simple, fast static site generator written in Go — featuring incremental builds, syntax highlighting, Mermaid diagrams, and a live-reload dev server.
日本語版: README.ja.md
This logo was created by gopherize.me.
- Incremental builds — Regenerate only changed files, minimising build time
- Project scaffolding —
gohan initbootstrapsconfig.yaml, content folders, and archetype templates - Content linter —
gohan checkvalidates duplicate slugs, missing front matter, and orphan translation keys - Archetype templates —
gohan new --archetype=<name>renders custom front-matter skeletons fromarchetypes/<name>.md - Markdown + Front Matter — GitHub Flavored Markdown with YAML metadata
- TOC / WordCount / ReadingTime — Auto-derived per article and exposed to templates
- Scheduled posts — Future-dated articles are skipped by default; opt in with
gohan build --future - Build observability —
--statsprints per-phase timing;--explainshows what triggered a rebuild - Syntax highlighting — Code blocks styled with chroma
- Mermaid diagrams — Fenced
mermaidblocks render as interactive diagrams - Taxonomy — Tag and category pages generated automatically
- Atom feed & sitemap —
atom.xmlandsitemap.xmlgenerated automatically - Live-reload dev server —
gohan servewatches files and reloads the browser (CSS-only changes hot-swap stylesheets without a full reload) - Customisable themes — Full control via Go
html/template - Plugin system — Built-in plugins enabled per-project via
config.yaml(no Go code required) - i18n — Multi-locale content with per-article translation links and
hreflangsupport - OGP image generation — Build-time
1200×630Open Graph images, one per article - Pagination — Configurable
per_pagewith automatic next/previous page links - GitHub source link — Per-article link to the source file on GitHub for easy editing
- Related articles — Automatic same-category article recommendations on article pages
go install github.com/bmf-san/gohan/cmd/gohan@latestOr build from source:
git clone https://github.com/bmf-san/gohan.git
cd gohan
make installPre-built binaries are available on GitHub Releases.
# 1. Scaffold a new project (creates config.yaml, content/, archetypes/, README.md)
gohan init myblog && cd myblog
# 2. Create your first article (uses archetypes/post.md)
gohan new --title="Hello, World!" hello-world
# 3. Validate the content (optional but recommended in CI)
gohan check
# 4. Build the site
gohan build
# 5. Preview locally with live reload
gohan serve # open http://127.0.0.1:1313See Configuration for all config.yaml options.
Full documentation site: https://bmf-san.github.io/gohan/
| Site | Description |
|---|---|
| bmf-tech.com (source) | Personal tech blog — i18n (EN/JA), 700+ articles, Cloudflare Pages |
See CONTRIBUTING.md for development setup and contribution guidelines.
If you'd like to support my work, please consider sponsoring me!
Or simply giving ⭐ on GitHub is greatly appreciated—it keeps me motivated to maintain and improve the project! :D