mkdocs-shadcn
raw JSON → 0.10.5 verified Fri May 01 auth: no python
A MkDocs theme that ports shadcn/ui components to documentation sites. Current version 0.10.5, requires Python >=3.8. Active development with regular releases.
pip install mkdocs-shadcn Common errors
error ModuleNotFoundError: No module named 'mkdocs_shadcn' ↓
cause Typo in import or package not installed.
fix
pip install mkdocs-shadcn and use correct import: from mkdocs_shadcn import ShadcnTheme
error ValueError: Unsupported theme 'shadcn' ↓
cause Using old theme name in mkdocs.yml.
fix
Change theme: shadcn to theme: mkdocs-shadcn in mkdocs.yml
Warnings
gotcha The theme does not support MkDocs plugins that modify page content post-render (e.g., some search plugins). Ensure compatibility. ↓
fix Disable conflicting plugins or test thoroughly.
deprecated Version 0.9.x used 'shadcn' as theme name; newer versions require 'mkdocs-shadcn' in mkdocs.yml. ↓
fix Set theme: mkdocs-shadcn in mkdocs.yml.
gotcha The theme expects a specific directory structure for custom assets (e.g., docs/assets). Using a flat structure may break CSS/JS loading. ↓
fix Organize docs/ with assets/ subdirectory.
Imports
- ShadcnTheme
from mkdocs_shadcn import ShadcnTheme
Quickstart
import os
from mkdocs_shadcn import ShadcnTheme
# Example: output theme config (no build here)
print("Theme ready. Configure mkdocs.yml with theme: shadcn")