Skip to content
Latchkey

MkDocs "Unrecognised theme name: 'material'" in CI

mkdocs.yml sets theme: name: material, but the mkdocs-material package is not installed in the runner. MkDocs only knows about themes registered by installed packages, so it rejects the name.

What this error means

mkdocs build fails with "Config value 'theme': Unrecognised theme name: 'material'. The available installed themes are: mkdocs, readthedocs".

mkdocs
Config value 'theme': Unrecognised theme name: 'material'. The available installed themes
are: mkdocs, readthedocs

Common causes

mkdocs-material is not installed in CI

Material is a separate package; if the runner only installed mkdocs, the material theme is not registered and the name is unrecognised.

Docs dependencies were not installed before build

The build step ran before installing the requirements file that pins mkdocs-material.

How to fix it

Install mkdocs-material

  1. Add mkdocs-material to your docs requirements.
  2. Install requirements before mkdocs build.
  3. Rebuild; the available themes now include material.
Terminal
pip install mkdocs-material
mkdocs build --strict

Pin docs dependencies

Keep Material and any plugins in one requirements file the CI job installs.

docs/requirements.txt
# docs/requirements.txt
mkdocs
mkdocs-material

How to prevent it

  • Install mkdocs-material in CI, not just mkdocs.
  • Pin the theme and plugins in a requirements file.
  • Install requirements before the build step.

Frequently asked questions

What causes ""Unrecognised theme name: 'material'""?
Material is a separate package; if the runner only installed mkdocs, the material theme is not registered and the name is unrecognised.
How do I fix "Unrecognised theme name: 'material'"?
Install mkdocs-material

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card