A zero-dependency static site generator for documentation. Just write Markdown and deploy — no plugins, no runtime, no extra tools required.
Documentation: https://yhirose.github.io/docs-gen/
- Built-in themes (dark/light)
- Live-reload development server
- Syntax highlighting
- Client-side full-text search
- Multi-language support
cargo install docs-genRequires Rust. After installation, the docs-gen command is available globally.
docs-gen init my-docsThis generates config.toml and sample pages:
my-docs/
├── config.toml # Site title, URL, footer, navigation
└── pages/
└── en/ # Add .md files anywhere under here
├── index.md # Homepage
├── users-guide/ # Section (has its own sidebar)
│ ├── index.md
│ └── *.md # Pages with frontmatter
└── developers-guide/ # Section for contributors
├── index.md
└── *.md # Pages with frontmatter
docs-gen serve my-docs --openThe serve command watches your files and automatically reloads the browser whenever you save a change. Keep it running while you edit — every save is reflected instantly.
Update the settings for your site. The generated file includes comments explaining each field. See the User's Guide for more.
[system]
theme = "default" # Run `docs-gen theme list` to see options
langs = ["en"] # ["en", "ja"] for multi-language
[site]
title = "My Docs"
version = "0.1.0"
hostname = "https://username.github.io" # Your site's hostname
base_path = "/my-project" # URL path prefix (or "" if served from root)
footer_message = "© 2026 Your Name. All rights reserved."
[[nav]]
label = "Guide"
path = "users-guide/"Add .md files anywhere under pages/en/ — they become pages automatically. Group related pages into subdirectories (each with an index.md) to create sections with sidebar navigation. Each page starts with a frontmatter header:
---
title: My New Page
order: 2 # Unique within the section, controls sidebar order
---
Your content here...docs-gen check my-docs
docs-gen build my-docs docsThe docs/ directory is plain static HTML — deploy it to any hosting service.
GitHub Pages: commit and push
docs/, then go to Settings > Pages, set Source to Deploy from a branch, and choose your branch with/docsfolder. See the Deploying guide for GitHub Actions, Netlify, and other options.
| Command | Description |
|---|---|
init [DIR] [--theme NAME] |
Scaffold a new project (default: current directory) |
serve [SRC] [--port PORT] [--open] [--theme NAME] |
Build and serve locally with live-reload |
build SRC OUT [--theme NAME] |
Generate static HTML for deployment |
check [SRC] |
Check for broken links, duplicate orders, and other issues |
theme list |
List available built-in themes |
theme install NAME [SRC] [--force] |
Install a built-in theme into the project |
| Theme | Description |
|---|---|
default |
Dark/light theme with color accents |
monotone |
Calm, sophisticated grayscale-only theme (dark/light) |
Use --theme NAME with init, serve, or build to select a theme. See the Customizing Themes guide for details.
- Writing Pages — Markdown features, frontmatter options, and page organization
- Configuration — All config.toml settings explained
- Customizing Themes — Install and edit themes to match your brand
- Checking Your Site — Validate links and order before building
- Deploying — GitHub Pages and other hosting services
- Creating Themes — Build your own theme from scratch
- Developer's Guide — Contributing and working on docs-gen itself
MIT