Skip to content

Commit af3fcca

Browse files
committed
Fix Read the Docs build by replacing deprecated sphinx-bootstrap-theme with sphinx-book-theme
- Replace sphinx-bootstrap-theme with sphinx-book-theme in docs/doc_requirements.txt - Update docs/conf.py to use sphinx_book_theme with proper configuration - Update setup.py extras_require to match documentation requirements - Resolves RTD build failure caused by deprecated use_2to3 in sphinx-bootstrap-theme
1 parent ca50c3e commit af3fcca

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

docs/conf.py

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
# import sys
2323
import sys
2424

25-
import sphinx_bootstrap_theme
26-
2725
sys.path.insert(0, os.path.abspath("../"))
2826

2927
# Configure matplotlib to use non-interactive backend for documentation
@@ -125,28 +123,26 @@
125123

126124
# The theme to use for HTML and HTML Help pages. See the documentation for
127125
# a list of builtin themes.
128-
html_theme = "bootstrap"
126+
html_theme = "sphinx_book_theme"
129127

130128
# Theme options are theme-specific and customize the look and feel of a theme
131129
# further. For a list of options available for each theme, see the
132130
# documentation.
133131
extlinks = {"github": "https://github.com/ContextLab/timecorr"}
134132

135133
html_theme_options = {
136-
"source_link_position": "footer",
137-
"bootswatch_theme": "yeti",
138-
"navbar_sidebarrel": False,
139-
"bootstrap_version": "3",
140-
"navbar_links": [
141-
("API", "api"),
142-
("Gallery", "auto_examples/index"),
143-
("Tutorials", "tutorials"),
144-
("Download", "http://www.github.com/ContextLab/timecorr", True),
145-
],
134+
"repository_url": "https://github.com/ContextLab/timecorr",
135+
"use_repository_button": True,
136+
"use_issues_button": True,
137+
"use_download_button": True,
138+
"path_to_docs": "docs/",
139+
"show_navbar_depth": 2,
146140
}
147141

148-
# Add any paths that contain custom themes here, relative to this directory.
149-
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
142+
# Add any paths that contain custom static files (such as style sheets) here,
143+
# relative to this directory. They are copied after the builtin static files,
144+
# so a file named "default.css" will overwrite the builtin "default.css".
145+
html_static_path = ['_static']
150146

151147
# -- Options for HTMLHelp output ------------------------------------------
152148

docs/doc_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
sphinx>=4.0.0
2-
sphinx_bootstrap_theme==0.4.13
2+
sphinx-book-theme
33
sphinx-gallery
44
numpydoc
55
nbsphinx

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
extras_require={
3434
"docs": [
3535
"sphinx>=4.0.0",
36-
"sphinx_bootstrap_theme==0.4.13",
36+
"sphinx-book-theme",
3737
"sphinx-gallery",
3838
"numpydoc",
3939
"nbsphinx",

0 commit comments

Comments
 (0)