Insert the following into your conf.py
configuration file to enable the theme:
import sphinx_modern_theme
html_theme = 'sphinx_modern_theme'
pygments_style = 'default'
html_theme_path = [
sphinx_modern_theme.get_html_theme_path(),
]
html_logo = '_static/logo.png'
Note
html_theme
will probably already be set to something. Make sure you only set it once.
Note
pygments_style = 'default'
is not the default
Note
A logo is required
You can pass options to the theme as a dictionary:
html_theme_options = {
'versions_url': '/_static/versions.json'
}