Skip to content

Commit b836e3f

Browse files
committed
Use RTD theme locally
1 parent 5c80a8f commit b836e3f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_build
2+
html

conf.py

+7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111

1212
import sys, os
1313

14+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
15+
16+
if not on_rtd: # only import and set the theme if we're building docs locally
17+
import sphinx_rtd_theme
18+
html_theme = 'sphinx_rtd_theme'
19+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
20+
1421
# -- General configuration -----------------------------------------------------
1522

1623
# Add any Sphinx extension module names here, as strings. They can be extensions

0 commit comments

Comments
 (0)