Skip to content

Commit 4883a48

Browse files
authored
Update docs theme to match marshmallow (#1026)
1 parent 7df8466 commit 4883a48

File tree

4 files changed

+96
-30
lines changed

4 files changed

+96
-30
lines changed

docs/_static/custom.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* Headings */
2+
3+
h2, h3, h4, h5, h6 {
4+
font-weight: 400;
5+
}
6+
7+
/* UI elements: left and right sidebars, "Back to top" button, admonitions, Copy button */
8+
.sidebar-drawer, .toc-drawer, .back-to-top, .admonition, .copybtn {
9+
/* Sans-serif system font stack */
10+
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
11+
}
12+
13+
/* Hide ToC caption text within the main body (but leave them in the side-bar). */
14+
/* https://github.com/hynek/structlog/blob/b488a8bf589a01aabc41e3bf8df81a9848cd426c/docs/_static/custom.css#L17-L20 */
15+
#furo-main-content span.caption-text {
16+
display: none;
17+
}

docs/conf.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,18 @@
3030

3131
# THEME
3232

33-
html_theme = "sphinx_rtd_theme"
33+
html_theme = "furo"
34+
html_theme_options = {
35+
"source_repository": "https://github.com/marshmallow-code/apispec",
36+
"source_branch": "dev",
37+
"source_directory": "docs/",
38+
"light_css_variables": {
39+
"font-stack": "Charter, Iowan Old Style, Palatino Linotype, Palatino, Georgia, serif;",
40+
},
41+
"top_of_page_buttons": ["view", "edit"],
42+
}
43+
pygments_dark_style = "lightbulb"
44+
html_static_path = ["_static"]
45+
html_css_files = ["custom.css"]
46+
html_copy_source = False
47+
html_show_sourcelink = False

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ docs = [
5050
"marshmallow>=3.18.0",
5151
"pyyaml",
5252
"sphinx-issues",
53-
"sphinx-rtd-theme",
53+
"furo",
5454
"sphinx>=8.1",
5555
]
5656
tests = ["openapi-spec-validator", "pytest"]

uv.lock

Lines changed: 63 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)