Installation¶
Theme is available as a package on PyPI. It comes in a form of Sphinx extension. Sphinx is a popular documentation tool for Python projects, but it is rather versatile and can be used for anything, really.
To install the theme, just add it to your requirements.txt
or pyproject.toml with your favourite package manager:
pip3 install sphinx_mcl_theme
Using the theme¶
To use the theme, you’ll have to activate the extension and
pick it as html_theme in your conf.py:
extensions = ['sphinx_mcl_theme']
html_theme = 'sphinx_mcl_theme'
Warning
This theme comes as an extension, so if you don’t activate it,
you would be unable to select it as html_theme. If you
encounter trouble building your docs, please ensure that you
did activate it as an extension first.
Also, if you’re new to Sphinx, you may be interested in taking a look into Sphinx’s Build your first project guide.
Using without Git¶
The theme comes with [configurable attribution generator][extras/attrib.md] that is enabled by default. If you don’t use Git or prefer not to use it, you can disable it like so:
mcl_extras_use_auto_attrib = False
Separating your docs’ dependencies¶
If you’re documenting a Python project and want to keep documentation in the same tree as the code, you might wanna have a separate set of dependencies for your documentation site.
Common way to achieve that would be using PEP 735
dependency groups. You can add Sphinx, this theme and
other extensions to a docs dependency group, for example,
with uv manager:
uv add --group docs sphinx_mcl_theme
Refer to the documentation of your package manager on how to add dependencies to a group.