1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
# pyinfra
# File: docs/conf.py
# Desc: minimal Sphinx config
import os
extensions = [
# Official
'sphinx.ext.autodoc',
'sphinx.ext.napoleon'
]
source_suffix = '.rst'
master_doc = 'index'
project = 'pyinfra'
copyright = '2015, Nick Barrett (Fizzadar)'
author = 'Fizzadar'
version = 'develop'
pygments_style = 'sphinx'
# Theme style override
html_theme = 'sphinx_rtd_theme'
html_static_path = ['static']
# Because RTD decided to add their CSS *below* the template header, in dev we have to
# put the theme CSS after the custom CSS (so dev == rtd). But for actual RTD we want to
# put our styles as the only CSS file, which will be included before RTDs silly overrides.
if os.environ.get('READTHEDOCS') == 'True':
style_file = '_static/theme.css'
else:
html_style = 'theme.css'
style_file = '_static/css/theme.css'
html_context = {
'css_files': [style_file]
}
|