File: conf.py

package info (click to toggle)
pyinfra 0.2.2%2Bgit20161227.ec708ef-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 11,804 kB
  • ctags: 677
  • sloc: python: 5,944; sh: 71; makefile: 11
file content (37 lines) | stat: -rw-r--r-- 892 bytes parent folder | download
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]
}