A professional, ready-to-use documentation template powered by MkDocs Material
About • Features • Installation • Menus • Pages • Admonitions • Customization • Deployment
This is a professional documentation template built with MkDocs Material by Perseverance Technology Co., Ltd.
We built this template so you can create beautiful, well-organized documentation without starting from scratch. Just clone it, change the content, and you're ready to go.
Here's what it looks like:
| Light Mode | Dark Mode |
|---|---|
![]() |
![]() |
| Feature | What It Does |
|---|---|
| Modern Design | Clean, professional UI with the Material theme |
| Dark / Light Mode | Users can toggle between dark and light themes |
| Fully Responsive | Looks great on desktop, tablet, and mobile |
| Instant Search | Built-in client-side search — fast and always available |
| Code Highlighting | Syntax highlighting for 100+ programming languages with copy button |
| Mermaid Diagrams | Create flowcharts, sequence diagrams, and more directly in Markdown |
| Versioning | Manage multiple documentation versions (v1.x, v2.x) using Mike |
| Auto Deploy | Push to main and it is automatically deployed via GitHub Actions |
| Admonitions | Callout boxes for notes, tips, warnings, and more |
| Content Tabs | Tabbed content for multi-platform guides (Windows / macOS / Linux) |
Make sure these are installed on your computer:
| Software | Minimum Version | Check Command |
|---|---|---|
| Python | 3.8 or higher | python --version |
| pip | (comes with Python) | pip --version |
| Git | Any recent version | git --version |
Tip: If
pythondoes not work on your system, trypython3instead.
1. Clone (download) this project:
git clone https://github.com/perseverance-tech-tw/Documentation-Template.git
cd Documentation-Template2. Create a virtual environment:
A virtual environment keeps this project's packages separate from your system. This is recommended.
python -m venv .venv3. Activate the virtual environment:
# Linux / macOS:
source .venv/bin/activate
# Windows (Command Prompt):
.venv\Scripts\activate
# Windows (PowerShell):
.venv\Scripts\Activate.ps1You will see
(.venv)at the beginning of your terminal line when the virtual environment is active.
4. Install the required packages:
pip install -r requirements.txtThis installs three packages:
mkdocs-material— the documentation framework and thememike— version management for your docspymdown-extensions— extra Markdown features (tabs, code highlighting, etc.)
5. Start the local preview server:
mkdocs serveThen open your browser and go to: http://localhost:8000
Any changes you save to your files will automatically refresh in the browser (live reload).
Here's how the files are organized:
Documentation-Template/
│
├── .github/
│ └── workflows/
│ └── ci.yml # Auto-deploy script (GitHub Actions)
│
├── docs/ # -- ALL YOUR CONTENT GOES HERE
│ ├── assets/
│ │ └── images/
│ │ └── ui/
│ │ └── logo.png # Your project logo
│ ├── definition/
│ │ └── index.md # Overview page
│ ├── features/
│ │ └── index.md # Features page
│ ├── install/
│ │ └── index.md # Installation guide page
│ ├── operations/
│ │ └── index.md # Operations guide page
│ ├── release-notes/
│ │ └── index.md # Release notes page
│ ├── usage/
│ │ ├── index.md # Usage guide page
│ │ └── mkdocs-mike-guide.md # MkDocs + Mike versioning guide
│ ├── javascripts/
│ │ └── scroll-animate.js # Custom scroll animation
│ ├── stylesheets/
│ │ └── extra.css # Custom CSS styles
│ ├── favicon.ico # Browser tab icon
│ └── index.md # -- HOME PAGE
│
├── overrides/
│ └── partials/
│ └── footer.html # Custom footer template
│
├── mkdocs.yml # -- MAIN CONFIG FILE (everything is set here)
├── requirements.txt # Python package list
└── readme.md # This file
| File | What It Does |
|---|---|
mkdocs.yml |
The control center. Manages site name, navigation menus, theme, plugins, and more. |
docs/index.md |
The home page — the first thing visitors see. |
docs/ folder |
Where all your Markdown content pages live. |
overrides/partials/footer.html |
Custom footer (logo + copyright + social links). |
.github/workflows/ci.yml |
Automatically deploys your docs when you push to main. |
The navigation menu (sidebar) is controlled by the nav section in mkdocs.yml.
Here's what the current navigation looks like:
# In mkdocs.yml
nav:
- Home: index.md
- Release Notes: release-notes/index.md
- Installation Guide: install/index.md
- Overview: definition/index.md
- Features: features/index.md
- Usage Guide:
- usage/index.md
- MkDocs + Mike Guide: usage/mkdocs-mike-guide.md
- Operations: operations/index.mdAnd here's how it appears on the website:
The sidebar on the left shows all the menu items defined in
nav.
To add a new menu item at the top level, simply add a new line:
Example: Adding an "API Reference" menu
nav:
- Home: index.md
- Release Notes: release-notes/index.md
- Installation Guide: install/index.md
- Overview: definition/index.md
- Features: features/index.md
- Usage Guide:
- usage/index.md
- MkDocs + Mike Guide: usage/mkdocs-mike-guide.md
- Operations: operations/index.md
- API Reference: api/index.md # <-- NEW MENU ADDED HEREThen create the corresponding file:
mkdir -p docs/apiCreate the file docs/api/index.md with your content:
# API Reference
Documentation for the project API.
---
## Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | `/api/users` | Get list of users |
| POST | `/api/users` | Create a new user |Sub-menus let you group multiple pages under one parent menu. Use indentation (2 spaces):
Example: Adding sub-pages under "Usage Guide"
nav:
- Usage Guide:
- usage/index.md # Main page (shown when clicking the menu)
- MkDocs + Mike Guide: usage/mkdocs-mike-guide.md
- Backup Guide: usage/backup-guide.md # <-- New sub-page
- Migration Guide: usage/migration-guide.md # <-- New sub-pageThen create the files:
touch docs/usage/backup-guide.md
touch docs/usage/migration-guide.mdJust rearrange the lines in nav. The order in the file = the order on the website:
nav:
- Home: index.md
- Features: features/index.md # <-- Now second
- Installation Guide: install/index.md # <-- Now third
# ... and so onImportant: All file paths in
navare relative to thedocs/folder. For example,install/index.mdrefers todocs/install/index.md.
All content pages are written in Markdown (.md files) inside the docs/ folder.
Basic page template:
# Page Title
A brief description of what this page covers.
---
## Section 1
Write your content here. You can use:
- **Bold text** with `**text**`
- *Italic text* with `*text*`
- `Inline code` with backticks
- [Links](https://example.com) with `[text](url)`
---
## Section 2
### Sub-Section
More content goes here.Example: Creating a "Troubleshooting" page
-
Create the folder and file:
mkdir -p docs/troubleshooting
-
Create
docs/troubleshooting/index.mdwith content:# Troubleshooting Common problems and how to fix them. --- ## Module Not Found Error **Cause:** Packages are not installed. **Fix:** ```bash pip install -r requirements.txt
Cause: Another app is using port 8000.
Fix:
mkdocs serve -a localhost:8001
Add it to the nav section in mkdocs.yml:
nav:
- Home: index.md
# ... other menus ...
- Troubleshooting: troubleshooting/index.md # <-- ADD HERENote: If you skip this step, the page still exists and can be accessed by URL — it just will not appear in the sidebar.
- Put your image in
docs/assets/images/ - Reference it in your Markdown:
Admonitions are colored callout boxes that highlight important information. This template already has them enabled.
Here's what they look like on the site:
See the yellow "Current Version: 2.x" box at the bottom — that is an admonition.
Here are all the types you can use:
!!! note "Important Note"
This is extra information that might be useful.!!! tip "Pro Tip"
A helpful suggestion or best practice.!!! warning "Be Careful"
Something that could cause problems if ignored.!!! danger "Critical Warning"
Can cause data loss or system damage.!!! info "Did You Know?"
General information to help understanding.!!! success "All Done!"
Confirmation that something was completed successfully.!!! question "FAQ"
A common question with an answer.!!! example "Example"
A practical example to illustrate a concept.!!! quote "Quote"
A quote from a reliable source.!!! bug "Known Bug"
A documented bug and its status.Use ??? instead of !!! to make an admonition that users can collapse:
Collapsed by default (click to open):
??? note "Click to expand"
This content is hidden until the user clicks on it.
Great for optional details.Open by default (click to close):
???+ note "Click to collapse"
This content is visible by default.
Users can click to hide it.This template comes with many powerful Markdown extensions already enabled. Here's how to use them.
Perfect for showing instructions for different platforms or options side by side.
Notice the New Users / Administrators / Developers tabs — each displays different content depending on the selected role.
How to write content tabs:
=== "Windows"
Instructions for Windows users.
```bash
choco install your-app
```
=== "macOS"
Instructions for Mac users.
```bash
brew install your-app
```
=== "Linux"
Instructions for Linux users.
```bash
sudo apt install your-app
```Important: Content inside a tab must be indented with 4 spaces.
Basic code block:
```python
def hello():
print("Hello, World!")
```With line numbers:
```python linenums="1"
def hello():
print("Hello, World!")
return True
```Highlight specific lines:
```python hl_lines="2 3"
def hello():
print("Hello, World!") # This line is highlighted
return True # This one too
```Inline code highlight:
Use `#!python print("hello")` to print to the console.All code blocks automatically have a Copy button in the top-right corner.
You can create diagrams directly in your Markdown files — no external tools needed!
Flowchart:
```mermaid
flowchart LR
A[Start] --> B{Decision?}
B -->|Yes| C[Process A]
B -->|No| D[Process B]
C --> E[Done]
D --> E
```Sequence Diagram:
```mermaid
sequenceDiagram
User->>+Server: Request
Server->>+Database: Query
Database-->>-Server: Result
Server-->>-User: Response
```Use emoji in your documentation with :emoji_name: syntax:
:material-check: Done
:material-close: Failed
:material-alert: Warning
:fontawesome-brands-github: GitHub
:fontawesome-brands-python: PythonBrowse all available icons: Material Design Icons
| Column 1 | Column 2 | Column 3 |
| :--- | :---: | ---: |
| Left-aligned | Centered | Right-aligned |
| Data A | Data B | Data C |
:---= left,:---:= center,---:= right
All customization is done through mkdocs.yml and the overrides/ folder.
Open mkdocs.yml and update these lines at the top:
site_name: Your Project Name
site_url: https://your-username.github.io/your-project/
repo_url: https://github.com/your-username/your-project
repo_name: Your Project
copyright: "© 2026 Your Company. All rights reserved."| Setting | What It Changes |
|---|---|
site_name |
The name shown in the header and browser tab |
site_url |
The URL where your docs will be hosted |
repo_url |
Adds a link to your GitHub repo in the header |
repo_name |
The label for the GitHub link |
copyright |
Text shown in the footer |
| Asset | File Location | Where It Appears |
|---|---|---|
| Logo | docs/assets/images/ui/logo.png |
Header and footer |
| Favicon | docs/favicon.ico |
Browser tab icon |
To change the logo:
- Prepare your logo image (PNG recommended, at least 200×200px)
- Replace
docs/assets/images/ui/logo.pngwith your image - Replace
docs/favicon.icowith your icon
Tip: Use favicon.io to generate a
.icofile from your logo image.
Edit the theme.palette section in mkdocs.yml:
theme:
palette:
# Light Mode
- scheme: default
primary: blue # Main color (header, links)
accent: amber # Accent color (buttons, hover)
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Dark Mode
- scheme: slate
primary: blue
accent: amber
toggle:
icon: material/brightness-4
name: Switch to light modeAvailable colors for primary:
red |
pink |
purple |
deep purple |
indigo |
blue |
light blue |
cyan |
teal |
green |
light green |
lime |
yellow |
amber |
orange |
deep orange |
brown |
grey |
blue grey |
black |
theme:
font:
text: Space Grotesk # Body text font
code: JetBrains Mono # Code fontFonts are loaded from Google Fonts. You can use any font available there, such as:
Roboto,Inter,Poppins,Open Sans,Lato,Outfit,Nunito, etc.
The custom footer is in overrides/partials/footer.html. It automatically displays:
- Logo & site name (pulled from
mkdocs.yml) - Copyright text (pulled from
mkdocs.yml) - Social links (if configured — see below)
You can edit this HTML file directly to change the footer layout.
Uncomment and update the social section in mkdocs.yml:
extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/your-username
- icon: fontawesome/brands/twitter
link: https://twitter.com/your-username
- icon: fontawesome/brands/linkedin
link: https://linkedin.com/in/your-username
- icon: fontawesome/brands/instagram
link: https://instagram.com/your-usernameThese will appear as icons in the footer.
The custom stylesheet is at docs/stylesheets/extra.css. It controls:
| Section | What You Can Change |
|---|---|
Design System (:root) |
Global colors for light and dark mode |
| Header & Navigation | Header background, search bar styling, version dropdown |
| Code Blocks | Code box colors, border, copy button style |
| Tables | Table borders and background |
| Admonitions | Callout box colors and styling |
| Footer | Footer layout, logo size, colors |
| Motion | Scroll animations |
Quick color change: Edit the CSS variables in
:root(for light mode) and[data-md-color-scheme="slate"](for dark mode) to change colors globally.
For a simple, one-version documentation site:
mkdocs gh-deploy --forceThis builds your site and pushes it to the gh-pages branch.
Use Mike to manage multiple versions (e.g., v1.0 and v2.0 side by side):
First time setup:
# Deploy version 1.0 and label it "latest"
mike deploy --push 1.0 latest
# Set "latest" as the default page visitors see
mike set-default --push latestUpdate existing version:
# Re-deploy version 1.0 with updated content
mike deploy --push 1.0 latestRelease a new version:
# Deploy version 2.0 and move the "latest" label to it
mike deploy --push --update-aliases 2.0 latestOther useful commands:
mike list # See all deployed versions
mike delete --push 1.0 # Remove a version
mike serve # Preview versions locallyThe
latestalias ensures visitors always land on the newest version by default.
This template includes a GitHub Actions workflow (.github/workflows/ci.yml) that automatically deploys your documentation every time you push to the main branch.
Current setup (simple deploy):
- name: Deploy Documentation
run: mkdocs gh-deploy --forceTo switch to versioned deploy:
- Open
.github/workflows/ci.yml - Comment out the "Simple deployment" section
- Uncomment the "Deploy with Versioning" section
- Update the version variables as needed:
- name: Deploy with Versioning
env:
DOCS_VERSION_ID: "1.0"
DOCS_VERSION_TITLE: "Version 1.0"
DOCS_VERSION_ALIAS: latest
run: |
mike deploy --push --update-aliases -t "$DOCS_VERSION_TITLE" "$DOCS_VERSION_ID" "$DOCS_VERSION_ALIAS"
mike set-default --push latestGitHub Pages setup:
- Go to your repo on GitHub → Settings → Pages
- Under Source, select the
gh-pagesbranch - Click Save
- Your site will be live at:
https://your-username.github.io/your-project/
A quick reference for all the commands you'll use:
| Command | What It Does |
|---|---|
mkdocs serve |
Start a local preview server (with live reload) |
mkdocs serve -a localhost:8001 |
Preview on a different port |
mkdocs build |
Build the site into static HTML (into site/ folder) |
mkdocs gh-deploy |
Deploy directly to GitHub Pages |
mike serve |
Preview with the version selector dropdown |
mike deploy --push <version> latest |
Deploy a specific version |
mike list |
List all deployed versions |
mike delete --push <version> |
Remove a specific version |
mike set-default --push latest |
Set the default version |
Q: How do I add a new page?
- Create a
.mdfile inside thedocs/folder- Register it in the
navsection ofmkdocs.yml- Run
mkdocs serveto preview
Q: My changes don't show in the browser?
Make sure
mkdocs serveis running. If still not showing, try a hard refresh:Ctrl + Shift + R.
Q: How do I add images?
- Put the image in
docs/assets/images/- Reference it in Markdown:

Q: Can I have a page without it showing in the sidebar?
Yes! Just create the
.mdfile without adding it tonav. It will be accessible by URL but not visible in the sidebar menu.
Q: I get a "404 Not Found" after deploying with Mike?
Run:
mike set-default --push latest
Q: The version dropdown doesn't show up?
Make sure your
mkdocs.ymlhas:extra: version: provider: mike
Q: How do I change the language?
In
mkdocs.yml:theme: language: en # Options: en, id, zh, ja, ko, de, fr, etc.
Q: How do I add a new plugin?
- Install it:
pip install mkdocs-your-plugin- Add it to
requirements.txt- Add it to
mkdocs.yml:plugins: - search - your-plugin
We welcome contributions! Here's how:
- Fork this repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License — see the LICENSE file for details.
Perseverance Technology Co., Ltd.
Building innovative solutions for tomorrow
Made by Perseverance Technology Co., Ltd.
Copyright 2026 Perseverance Technology Co., Ltd. All rights reserved.




