Skip to content

Commit c0311f4

Browse files
committed
docs: try using Furo
1 parent 6a644c8 commit c0311f4

File tree

4 files changed

+18
-40
lines changed

4 files changed

+18
-40
lines changed

docs/_static/theme_overrides.css

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

docs/conf.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
# ones.
3838
extensions = [
3939
"breathe",
40+
"sphinx_copybutton",
4041
"sphinxcontrib.rsvgconverter",
4142
"sphinxcontrib.moderncmakedomain",
4243
]
@@ -127,23 +128,7 @@
127128
# The theme to use for HTML and HTML Help pages. See the documentation for
128129
# a list of builtin themes.
129130

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

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

docs/requirements.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
breathe==4.26.1
2-
sphinx==3.3.1
3-
sphinx_rtd_theme==0.5.0
4-
sphinxcontrib-moderncmakedomain==3.17
5-
sphinxcontrib-svg2pdfconverter==1.1.0
2+
furo
3+
sphinx==3.4.3
4+
sphinx-copybutton
5+
sphinxcontrib-moderncmakedomain==3.19
6+
sphinxcontrib-svg2pdfconverter==1.1.1

noxfile.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,17 @@ def docs(session: nox.Session) -> None:
5353

5454
session.install("-r", "docs/requirements.txt")
5555
session.chdir("docs")
56-
session.run("sphinx-build", "-M", "html", ".", "_build")
57-
58-
if session.posargs:
59-
if "serve" in session.posargs:
60-
print("Launching docs at http://localhost:8000/ - use Ctrl-C to quit")
61-
session.run("python", "-m", "http.server", "8000", "-d", "_build/html")
62-
else:
63-
print("Unsupported argument to docs")
56+
if "pdf" in session.posargs:
57+
session.run("sphinx-build", "-M", "latexpdf", ".", "_build")
58+
return
59+
else:
60+
session.run("sphinx-build", "-M", "html", ".", "_build")
61+
62+
if "serve" in session.posargs:
63+
print("Launching docs at http://localhost:8000/ - use Ctrl-C to quit")
64+
session.run("python", "-m", "http.server", "8000", "-d", "_build/html")
65+
elif session.posargs:
66+
print("Unsupported argument to docs")
6467

6568

6669
@nox.session(reuse_venv=True)

0 commit comments

Comments
 (0)