DocAnvil

Installation

Get DocAnvil running and create your first documentation site.

Install DocAnvil

# Install from crates.io (when published)
cargo install docanvil
# Build from source
git clone https://github.com/docanvil/docanvil.git
cd docanvil
cargo install --path .

Verify the installation:

docanvil --help

Create a Project

Scaffold a new documentation project with docanvil new:

docanvil new my-docs

This creates the following structure:

my-docs/
  docanvil.toml        # Project configuration
  nav.toml             # Navigation structure
  docs/                # Your Markdown content
    index.md           # Home page
    guides/
      getting-started.md
      configuration.md
  theme/
    custom.css         # Your CSS overrides

Start the Dev Server

cd my-docs
docanvil serve

The dev server starts at http://localhost:3000 by default. You can change the host and port:

docanvil serve --host 0.0.0.0 --port 8080

Write Your First Page

Create a new Markdown file anywhere in the docs/ directory:

# My New Page

Welcome to my documentation!

- Supports **bold**, *italic*, and ~~strikethrough~~
- Add links to other pages with wiki-link syntax

Save the file and your browser will reload automatically. The page is discovered and added to the navigation.

Build for Production

When you're ready to deploy, generate the static site:

docanvil build

The output goes to the dist/ directory by default. Upload it to any static host — GitHub Pages, Netlify, Vercel, S3, or just a plain web server.

Use --clean to remove the output directory before building:

docanvil build --clean

For CI/CD pipelines, use --strict to fail the build when there are any warnings:

docanvil build --strict

Checklist

Next Steps

Note

DocAnvil watches all files in your project directory. Changes to Markdown, config files, CSS, and templates all trigger a live reload.