Skip to content

Commit 859327f

Browse files
committed
📚 DOCS: Add theme specific config
1 parent 2cc6d27 commit 859327f

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

docs/conf.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,44 @@
1010
html_theme = os.environ.get("SPHINX_THEME", "alabaster")
1111
html_title = f"Sphinx Design ({html_theme.replace('_', '-')})"
1212

13+
html_static_path = ["_static"]
1314
html_logo = "_static/logo_wide.svg"
1415
html_favicon = "_static/logo_square.svg"
1516

1617
if html_theme == "alabaster":
1718
html_css_files = [
1819
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css"
1920
]
21+
html_logo = ""
22+
html_theme_options = {
23+
"logo": "logo_wide.svg",
24+
"logo_name": False,
25+
"description": "(alabaster theme)",
26+
"github_button": False,
27+
"github_type": "star",
28+
"github_banner": False,
29+
"github_user": "executablebooks",
30+
"github_repo": "sphinx-design",
31+
}
32+
if html_theme == "sphinx_book_theme":
33+
html_theme_options = {
34+
"repository_url": "https://github.com/executablebooks/sphinx-design",
35+
"use_repository_button": True,
36+
"use_edit_page_button": True,
37+
"use_issues_button": True,
38+
"repository_branch": "main",
39+
"path_to_docs": "docs",
40+
"home_page_in_toc": True,
41+
"logo_only": True,
42+
}
43+
if html_theme == "furo":
44+
html_theme_options = {
45+
"sidebar_hide_name": True,
46+
}
47+
if html_theme == "sphinx_rtd_theme":
48+
html_theme_options = {
49+
"logo_only": True,
50+
}
2051

2152
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
2253
myst_enable_extensions = ["colon_fence", "deflist", "substitution", "html_image"]

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ theme_pydata =
5757
theme_rtd =
5858
sphinx-rtd-theme~=0.5.0
5959
theme_sbt =
60-
sphinx-book-theme~=0.1.0
60+
sphinx-book-theme~=0.1.1
6161

6262
[mypy]
6363
show_error_codes = True

0 commit comments

Comments
 (0)