Sphinx Immaterial Theme

0.13.9 · active · verified Thu Apr 16

Sphinx-Immaterial is an adaptation of the popular mkdocs-material theme for the Sphinx documentation system. It is actively maintained to stay up to date with the upstream mkdocs-material repository, incorporating HTML templates, JavaScript, and styles with mostly minor modifications. The current version is 0.13.9, with frequent minor releases as seen in the GitHub changelog, often driven by upstream `mkdocs-material` updates or Sphinx compatibility fixes.

Common errors

Warnings

Install

Imports

Quickstart

To quickly set up `sphinx-immaterial`, first initialize a Sphinx project using `sphinx-quickstart`. Then, modify the `conf.py` file to include `sphinx_immaterial` in your `extensions` list and set `html_theme = 'sphinx_immaterial'`. You can further customize the theme using `html_theme_options` in `conf.py`.

import os
import sys

# Minimal conf.py
project = 'My Project'
copyright = '2026, Your Name'
author = 'Your Name'
release = '0.1'

extensions = [
    'sphinx_immaterial',
    'sphinx.ext.autodoc', # Example standard extension
]

html_theme = 'sphinx_immaterial'
html_theme_options = {
    'icon': {
        'repo': 'fontawesome/brands/github'
    },
    'site_url': 'https://example.com/docs/'
}

# Example index.rst (or index.md if markdown is enabled)
# You would typically generate this with sphinx-quickstart first.
# Replace with content of docs/index.rst or equivalent.
# This part is illustrative, not executed Python code.
# Example: docs/index.rst
# My Project
# ===========
#
# Welcome to my project's documentation!
#
# .. toctree::
#    :maxdepth: 2
#    :caption: Contents:
#
#    module1
#    module2

view raw JSON →