Skip to content

Commit

Permalink
Always use Sphinx Read The Docs theme
Browse files Browse the repository at this point in the history
  • Loading branch information
chekunkov committed Mar 29, 2017
1 parent ec8a96d commit 1ba0d23
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,20 +166,11 @@
'Miscellaneous'),
]

# Following is taken from https://github.com/snide/sphinx_rtd_theme#
# using-this-theme-locally-then-building-on-read-the-docs
# Set Sphinx Read The Docs theme
import sphinx_rtd_theme

# on_rtd is whether we are on readthedocs.org,
# this line of code grabbed from docs.readthedocs.org

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# otherwise, readthedocs.org uses their theme by default, no need to specify it
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# disable cross-reference for ivar
# patch taken from http://stackoverflow.com/a/41184353/1932023
Expand Down

0 comments on commit 1ba0d23

Please sign in to comment.