Skip to content

Commit dc84b8d

Browse files
committed
docs: try using Furo
1 parent c42e3ab commit dc84b8d

File tree

4 files changed

+8
-33
lines changed

4 files changed

+8
-33
lines changed

docs/_static/theme_overrides.css

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/conf.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
# ones.
3636
extensions = [
3737
"breathe",
38+
"sphinx_copybutton",
3839
"sphinxcontrib.rsvgconverter",
3940
"sphinxcontrib.moderncmakedomain",
4041
]
@@ -125,23 +126,7 @@
125126
# The theme to use for HTML and HTML Help pages. See the documentation for
126127
# a list of builtin themes.
127128

128-
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
129-
130-
if not on_rtd: # only import and set the theme if we're building docs locally
131-
import sphinx_rtd_theme
132-
133-
html_theme = "sphinx_rtd_theme"
134-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
135-
136-
html_context = {"css_files": ["_static/theme_overrides.css"]}
137-
else:
138-
html_context = {
139-
"css_files": [
140-
"//media.readthedocs.org/css/sphinx_rtd_theme.css",
141-
"//media.readthedocs.org/css/readthedocs-doc-embed.css",
142-
"_static/theme_overrides.css",
143-
]
144-
}
129+
html_theme = "furo"
145130

146131
# Theme options are theme-specific and customize the look and feel of a theme
147132
# further. For a list of options available for each theme, see the
@@ -170,7 +155,7 @@
170155
# Add any paths that contain custom static files (such as style sheets) here,
171156
# relative to this directory. They are copied after the builtin static files,
172157
# so a file named "default.css" will overwrite the builtin "default.css".
173-
html_static_path = ["_static"]
158+
html_static_path = []
174159

175160
# Add any extra paths that contain custom files (such as robots.txt or
176161
# .htaccess) here, relative to this directory. These files are copied

docs/requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
breathe==4.32.0
2-
sphinx==4.4.0
3-
sphinx_rtd_theme==1.0.0
1+
breathe==4.34.0
2+
furo==2022.6.21
3+
sphinx==5.0.2
4+
sphinx-copybutton==0.5.0
45
sphinxcontrib-moderncmakedomain==3.21.4
56
sphinxcontrib-svg2pdfconverter==1.2.0

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def docs(session: nox.Session) -> None:
6161
session.chdir("docs")
6262

6363
if "pdf" in session.posargs:
64-
session.run("sphinx-build", "-b", "latexpdf", ".", "_build")
64+
session.run("sphinx-build", "-M", "latexpdf", ".", "_build")
6565
return
6666

6767
session.run("sphinx-build", "-b", "html", ".", "_build")

0 commit comments

Comments
 (0)