Quick Start
This guide walks you through creating your first MokaDocs documentation site.
1. Initialize Your Project
Navigate to your .NET solution directory and run:
mokadocs init
This creates:
mokadocs.yaml— site configurationdocs/— directory for your Markdown guidesdocs/index.md— your landing page
2. Configure Your Site
Edit mokadocs.yaml to point to your project:
site:
title: "My Library Docs"
description: "Documentation for MyLibrary"
content:
docs: ./docs
projects:
- path: ./src/MyLibrary/MyLibrary.csproj
label: "MyLibrary"
theme:
name: default
features:
search:
enabled: true
3. Write Your First Guide
Create docs/getting-started.md:
---
title: Getting Started
description: Learn how to use MyLibrary
order: 1
---
# Getting Started
Welcome to MyLibrary! Here's how to get started.
## Installation
Install from NuGet:
\`\`\`bash
dotnet add package MyLibrary
\`\`\`
## Basic Usage
\`\`\`csharp
using MyLibrary;
var result = MyClass.DoSomething("hello");
Console.WriteLine(result);
\`\`\`
4. Start the Dev Server
mokadocs serve
Open your browser to http://localhost:5080. You'll see:
- Your landing page
- Auto-generated API reference from your
.csproj - Full-text search
- Responsive sidebar navigation
The dev server watches for changes and automatically rebuilds. Edit a .md file or your C# code and the browser refreshes instantly.
5. Build for Production
When you're ready to deploy:
mokadocs build
The static site is generated in _site/ (configurable). Deploy this directory to any static hosting provider — GitHub Pages, Netlify, Vercel, Azure Static Web Apps, etc.
Project Structure
A typical MokaDocs project looks like this:
my-library/
├── src/
│ └── MyLibrary/
│ ├── MyLibrary.csproj
│ └── MyClass.cs
├── docs/
│ ├── index.md # Landing page
│ ├── getting-started.md # Guide page
│ └── guide/
│ ├── configuration.md # Nested guide
│ └── advanced.md # Nested guide
├── mokadocs.yaml # Site configuration
└── _site/ # Generated output (gitignore this)
What's Next?
Configuration
Learn about all configuration options
Markdown Guide
Master the Markdown extensions
API Documentation
Configure API reference generation
Themes
Customize the look and feel
Last updated: 2026-04-08