Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ee86180

Browse files
authored
Use sphinx theme locally and on rtd as extension (#1207)
1 parent ca45a2b commit ee86180

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

‎docs/conf.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# Add any Sphinx extension module names here, as strings. They can be
4141
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4242
# ones.
43-
extensions = ["sphinx.ext.autodoc", "recommonmark"]
43+
extensions = ["sphinx.ext.autodoc", "recommonmark", "sphinx_rtd_theme"]
4444
autodoc_member_order = "bysource"
4545
autodoc_inherit_docstrings = False
4646

@@ -122,15 +122,7 @@
122122

123123
# The theme to use for HTML and HTML Help pages. See the documentation for
124124
# a list of builtin themes.
125-
html_theme = "default"
126-
127-
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
128-
129-
if not on_rtd: # only import and set the theme if we're building docs locally
130-
import sphinx_rtd_theme
131-
132-
html_theme = "sphinx_rtd_theme"
133-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
125+
html_theme = "sphinx_rtd_theme"
134126

135127
# Theme options are theme-specific and customize the look and feel of a theme
136128
# further. For a list of options available for each theme, see the

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /