Theme Installation#
install packages#
Important
This is a setup guide for sphinx-book-theme, with several additional packages:
MyST
Sphinx Desing
Mermaid Diagramming
Sphinx Copybutton
The additional packages are necessary for this setup.
Install sphinx-book-theme with conda:
conda install -c conda-forge sphinx-book-theme
Theme configuration at conf.py:
html_theme = "sphinx_book_theme"
html_logo = "path/to/myimage.png" # (create folder, e.g. theme_custom)
html_title = "My site title"
# -- adds source repository button on theme
# -- current NOT Used
html_theme_options = {
...
"repository_url": "https://github.com/{your-docs-url}",
"use_repository_button": True,
...
}
See also
Package configuration details, see {book}theme.
MyST#
Markedly Structured Text - Parser
Install myst-parser with conda:
Note
to use markdown (files) for within this documenation
conda install -c conda-forge myst-parser
Theme configuration at conf.py:
extensions = [
..
'myst_parser',
..
]
myst_enable_extensions = [
'colon_fence',
'attrs_block'
]
‘attrs_block’ enable parsing of block attributes before certain block syntaxes
See also
Package configuration details, see {MyST}theme.
Sphinx-Design#
Install sphinx-design with conda:
Note
A sphinx extension for designing beautiful, view size responsive web components.
conda install -c conda-forge sphinx-design
Theme configuration at conf.py:
extensions = [
..
'sphinx_design',
..
]
See also
Package configuration details, see {MyST}theme and Sphinx Design Documentation
Mermaid Diagramming#
Note
This extension allows you to embed Mermaid graphs in your documents, including general flowcharts, sequence diagrams, gantt diagrams and more.
Install sphinxcontrib-mermaid with conda:
conda install -c conda-forge sphinxcontrib-mermaid
Theme configuration at conf.py:
extensions = [
..
'sphinxcontrib.mermaid',
..
]
See also
config files#
The following files needs to be configured
conf.py#
‘conf.py’ should contain:
extensions = [
..
'myst_parser', # TODO Check with DevTeam if deprecated, replaced
'sphinx_design',
'sphinxcontrib.mermaid',
'sphinx_copybutton'
..
]
Warning
Order of extensions is relevant !
extensions = [
'myst_parser',
'sphinx_design',
'sphinxcontrib.mermaid',
'sphinx_copybutton'
]
‘requirements.txt’#
mandatory for readthedocs, also see your config at .readthedocs.yaml if it’s declared there
# For readthedocs needed, otherwise import to readthedocs will fail
sphinx_book_theme
myst-parser
sphinx_design
sphinxcontrib.mermaid
sphinx_copybutton
# TODO Check with DevTeam if 'requirements.txt' is necessary, reommended or just for readthedocs setup