# MkDocs Material — Beautiful Documentation Theme with Search and Dark Mode > A feature-rich MkDocs theme built on Google's Material Design, offering instant search, dark mode, versioning, and 60+ plugins for professional documentation sites. ## Install Save as a script file and run: # MkDocs Material — Beautiful Documentation Theme with Search and Dark Mode ## Quick Use ```bash pip install mkdocs-material mkdocs new my-docs && cd my-docs # In mkdocs.yml, set: theme: { name: material } mkdocs serve ``` ## Introduction MkDocs Material is a documentation framework built on top of MkDocs and Google's Material Design guidelines. It turns Markdown files into polished, searchable documentation sites with minimal configuration, and is used by thousands of open-source projects and companies for their developer docs. ## What MkDocs Material Does - Renders Markdown documentation as a responsive Material Design website - Provides built-in client-side search powered by lunr.js with instant results - Supports light and dark color schemes with automatic OS-preference detection - Enables documentation versioning through mike integration - Offers 60+ official and community plugins for diagrams, social cards, blogs, and more ## Architecture Overview MkDocs Material extends the MkDocs static site generator with a custom theme layer. During build, MkDocs reads your `mkdocs.yml` configuration and Markdown source files, then Material applies Jinja2 templates and a webpack-bundled frontend to produce a static HTML/CSS/JS site. The search index is generated at build time and loaded client-side for zero-server-dependency search. ## Self-Hosting & Configuration - Install via pip, conda, or Docker: `docker run --rm -it -p 8000:8000 -v .:/docs squidfunk/mkdocs-material` - Configure in `mkdocs.yml` with theme name, palette colors, font, and logo - Enable plugins like `search`, `tags`, `blog`, or `social` in the plugins section - Set up navigation structure using the `nav` key or let MkDocs auto-discover pages - Deploy to GitHub Pages, GitLab Pages, Netlify, or any static hosting with `mkdocs gh-deploy` ## Key Features - Instant loading via XHR-based navigation without full page reloads - Built-in code highlighting with copy button, line numbers, and annotation support - Content tabs, admonitions, and collapsible sections for organized documentation - Social cards plugin that auto-generates Open Graph preview images - Integrated blog plugin for changelog and announcement pages alongside docs ## Comparison with Similar Tools - **Docusaurus** — React-based, better for custom interactive docs; Material is simpler for pure Markdown sites - **Sphinx** — More powerful for API reference generation; Material is easier to set up and theme - **VitePress** — Vue-powered with faster builds; Material has a larger plugin ecosystem - **GitBook** — Commercial SaaS with collaboration features; Material is fully self-hosted and free - **Read the Docs** — Hosting platform that supports MkDocs Material as a theme option ## FAQ **Q: Can I use MkDocs Material for free?** A: The core theme is MIT-licensed and free. An Insiders sponsorship unlocks additional features like privacy plugin and optimized search. **Q: Does it support multiple languages?** A: Yes. Built-in i18n plugin supports 60+ languages for both UI elements and content translation. **Q: How do I add diagrams?** A: Enable the `pymdownx.superfences` extension with a custom fence for Mermaid, or use the diagrams plugin for D2 and PlantUML. **Q: Can I version my documentation?** A: Yes. Use the `mike` tool to deploy multiple versions and add a version selector dropdown. ## Sources - https://github.com/squidfunk/mkdocs-material - https://squidfunk.github.io/mkdocs-material/ --- Source: https://tokrepo.com/en/workflows/asset-373738c4 Author: Script Depot