Skip to content

Commit

Permalink
Workaround to make docs build on read the docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
svetlyak40wt committed May 1, 2015
1 parent 62feccd commit 5860a7f
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,20 @@
open(os.path.join(os.path.dirname(__file__), '../setup.py')).read()
)[0]

import sphinx_py3doc_enhanced_theme
html_theme = "sphinx_py3doc_enhanced_theme"
html_theme_path = [sphinx_py3doc_enhanced_theme.get_html_theme_path()]
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if on_rtd:
# workaround for making build on read the docs pass
# see issue https://github.com/rtfd/readthedocs.org/issues/1202
html_theme = 'sphinx_rtd_theme'
else:
import sphinx_py3doc_enhanced_theme
html_theme = "sphinx_py3doc_enhanced_theme"
html_theme_path = [sphinx_py3doc_enhanced_theme.get_html_theme_path()]
html_theme_options = {
'githuburl': 'https://github.com/svetlyak40wt/python-processor/'
}


pygments_style = 'trac'
templates_path = ['.']
Expand All @@ -37,6 +48,3 @@
'**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
}
html_short_title = '%s-%s' % (project, version)
html_theme_options = {
'githuburl': 'https://github.com/svetlyak40wt/python-processor/'
}

0 comments on commit 5860a7f

Please sign in to comment.