Skip to content

Commit c52518c

Browse files
committed
Include rtd theme in requirements
1 parent 5581471 commit c52518c

2 files changed

Lines changed: 8 additions & 13 deletions

File tree

docs_sphinx/conf.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
# General information about the project.
6161
project = u'brian2tools'
62-
copyright = u'2016, Brian authors'
62+
copyright = u'2016, Brian authors'
6363
author = u'Brian authors'
6464

6565
# We mock modules that are not needed just for building the documentation
@@ -144,17 +144,12 @@
144144

145145
# -- Options for HTML output ----------------------------------------------
146146

147-
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
148-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
149-
150-
if not on_rtd:
151-
# ReadTheDocs theme
152-
try:
153-
import sphinx_rtd_theme
154-
html_theme = "sphinx_rtd_theme"
155-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
156-
except ImportError:
157-
pass # use the default theme
147+
try:
148+
import sphinx_rtd_theme
149+
html_theme = "sphinx_rtd_theme"
150+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
151+
except ImportError:
152+
pass # use the default theme
158153

159154

160155
# Theme options are theme-specific and customize the look and feel of a theme

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dynamic = ["version", "readme"]
4242

4343
[project.optional-dependencies]
4444
test = ["pytest"]
45-
docs = ["sphinx>=1.7"]
45+
docs = ["sphinx>=1.7", "sphinx-rtd-theme"]
4646

4747
[project.urls]
4848
Homepage = "https://github.com/brian-team/brian2tools"

0 commit comments

Comments
 (0)