Theme customized for https://pyrocko.org
!! Includes pyrocko piwik tracking code !!
docs | |
---|---|
tests | |
demo | default, bare |
package |
A theme based on https://github.com/ionelmc/sphinx-py3doc-enhanced-theme
- Free software: BSD license
pip install sphinx_sleekcat_theme
Add this in your documentation's conf.py
:
import sphinx_sleekcat_theme
html_theme = "sphinx_sleekcat_theme"
html_theme_path = [sphinx_sleekcat_theme.get_html_theme_path()]
This theme has some extra styling like different fonts, text shadows for headings, slightly different styling for inline code and code blocks.
To get the original styling Python 3 docs have add this in you conf.py
:
html_theme_options = {
'githuburl': 'https://github.com/pyrocko/pyrocko/',
'bodyfont': '"Lucida Grande",Arial,sans-serif',
'headfont': '"Lucida Grande",Arial,sans-serif',
'codefont': 'monospace,sans-serif',
'linkcolor': '#0072AA',
'visitedlinkcolor': '#6363bb',
'extrastyling': False,
'googlewebfonturl': 'http://fonts.googleapis.com/css?family=Rubik+One|Kalam',
'fontawesome': 'https://use.fontawesome.com/d51e5252e5.js',
}
pygments_style = 'friendly'
To have a custom favicon create a theme
directory near your conf.py
and add this theme.conf
in it:
[theme]
inherit = sphinx_sleekcat_theme
Then create a favicon.png
in the static
directory.
And then edit your conf.py
to have something like this:
import sphinx_sleekcat_theme
html_theme = "theme"
html_theme_path = [sphinx_sleekcat_theme.get_html_theme_path(), "."]
The final file structure should be like this:
docs ├── conf.py └── theme ├── static │ └── favicon.png └── theme.conf
html_theme_options = {
'appendcss': 'div.body code.descclassname { display: none }',
}