Installation

This guide walks you through setting up the MkDocs DAP theme from scratch.

Prerequisites

  • Python 3.8 or higher
  • pip

1. Install MkDocs and extensions

pip install mkdocs pymdown-extensions

The theme relies on PyMdown Extensions for syntax highlighting, admonitions, and other Markdown features.

2. Get the theme files

Option A — Clone from GitHub

git clone https://github.com/davidalvarezp/mkdocs-dap.git
cd mkdocs-dracula

Option B — Download ZIP

Download and extract the release ZIP from the GitHub releases page.

Option C — Add to an existing project

Copy the themes/dap folder into the root of your MkDocs project:

your-project/
├── docs/
│   └── index.md
├── themes/dap/       ← copy this folder from the release
│   ├── main.html
│   ├── partials/
│   └── assets/
└── mkdocs.yml

3. Configure mkdocs.yml

At minimum, your mkdocs.yml needs:

site_name: My Project

theme:
  name: null
  custom_dir: themes/dap

name: null tells MkDocs not to load any built-in theme. custom_dir: themes/dap points to your theme folder.

4. Run the development server

mkdocs serve

Open http://127.0.0.1:8000 in your browser.

5. Build for production

mkdocs build

The static site is generated in the site/ directory, ready to deploy to GitHub Pages, Netlify, Vercel, or any static host.


Deploying to GitHub Pages

mkdocs gh-deploy

This builds the site and pushes it to the gh-pages branch of your repository automatically.

Set site_url

For SEO and the sitemap to work correctly in production, always set site_url in mkdocs.yml:

site_url: https://your-username.github.io/your-repo


Troubleshooting

ERROR - Config value 'plugins': The "sitemap" plugin is not installed

The sitemap is built into MkDocs and does not need to be listed as a plugin. Remove sitemap from your plugins: list.

'T' is undefined

Make sure you have not accidentally deleted or moved themes/dap/main.html. The T dictionary is defined there and passed to all partials.

Fonts not loading

The theme loads Inter and JetBrains Mono from Google Fonts. If you are developing offline, the text will fall back to system fonts — this is expected.