Quick Start

Get up and running with your documentation site in minutes

Prerequisites

Before you begin, make sure you have the following installed:

1

Install Rust

Install Rust and Cargo using rustup:

bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
2

Install Dioxus CLI

Install the Dioxus CLI tool:

bash
cargo install dioxus-cli
3

Clone the Template

Clone this documentation template:

bash
git clone https://github.com/hauju/dioxus-docs-kit.git
    cd dioxus-docs-kit

Running the Development Server

Start the development server with hot reloading:

bash
dx serve

Project Structure

Here's an overview of the project structure:

text
dioxus-docs-kit/
├── docs/                        # Documentation content (MDX)
│   ├── _nav.json               # Navigation configuration
│   ├── getting-started/        # Getting started guides
│   ├── guides/                 # Usage guides
│   └── api-reference/          # API docs + OpenAPI specs
├── src/
│   └── main.rs                 # App entry point & docs glue code
├── build.rs                     # Generates content map from _nav.json
└── crates/
    ├── dioxus-docs-kit/         # Reusable docs site shell
    ├── dioxus-docs-kit-build/   # Build-time helper for content embedding
    └── dioxus-mdx/              # MDX parsing and rendering

Adding Documentation

1

Create MDX File

Create a new .mdx file in the docs/ directory:

mdx
---
    title: My New Page
    description: A brief description
    ---

    ## My Content

    Write your documentation here!
2

Update Navigation

Add your page to docs/_nav.json:

json
{
      "groups": [
        {
          "group": "My Section",
          "pages": ["my-new-page"]
        }
      ]
    }
3

Rebuild

The content is embedded at compile time, so rebuild to see changes:

bash
dx serve

Next Steps

Navigation