Sphinx Material
raw JSON → 0.0.36 verified Fri May 01 auth: no python
A Sphinx theme based on Google's Material Design. Current version 0.0.36, compatible with Python >=3.6. Development is sporadic with minor bugfix releases.
pip install sphinx-material Common errors
error Configuration error: unknown theme 'sphinx_material' ↓
cause sphinx-material package not installed or not in Python path.
fix
pip install sphinx-material
error ImportError: cannot import name 'sphinx_material' from 'sphinx_material' ↓
cause Mistakenly trying to import the theme as a Python module instead of using html_theme.
fix
Remove 'extensions.append("sphinx_material")' and set html_theme = 'sphinx_material'.
Warnings
gotcha Theme is not installed via extensions list; must set html_theme instead. ↓
fix Set html_theme = 'sphinx_material' in conf.py.
gotcha Theme options like 'nav_sidebar' may be None to inherit defaults, but incorrect keys silently ignored. ↓
fix Double-check theme option spelling in docs.
Imports
- html_theme wrong
extensions.append("sphinx_material")correcthtml_theme = "sphinx_material"
Quickstart
# conf.py
html_theme = 'sphinx_material'
html_theme_options = {
'nav_sidebar': None,
}