summaryrefslogtreecommitdiffstats
path: root/doc/conf.py.in
diff options
context:
space:
mode:
Diffstat (limited to 'doc/conf.py.in')
-rw-r--r--doc/conf.py.in108
1 files changed, 75 insertions, 33 deletions
diff --git a/doc/conf.py.in b/doc/conf.py.in
index cefa9e9..1fa288f 100644
--- a/doc/conf.py.in
+++ b/doc/conf.py.in
@@ -17,6 +17,13 @@ language = "en"
nitpicky = True
pygments_style = "friendly"
+try:
+ import sphinx_lv2_theme
+
+ have_lv2_theme = True
+except ModuleNotFoundError:
+ have_lv2_theme = False
+
# Ignore everything opaque or external for nitpicky mode
_opaque = [
"FILE",
@@ -56,38 +63,73 @@ nitpick_ignore = list(_c_nitpick_ignore) + list(_cpp_nitpick_ignore)
html_copy_source = False
html_secnumber_suffix = " "
html_short_title = "@ZIX_TITLE@"
-html_theme = "sphinx_lv2_theme"
-
-if tags.has("singlehtml"):
- html_sidebars = {
- "**": [
- "globaltoc.html",
- ]
- }
-
- html_theme_options = {
- "body_max_width": "46em",
- "body_min_width": "46em",
- "description": desc,
- "globaltoc_collapse": False,
- "globaltoc_maxdepth": 3,
- "logo_name": True,
- "nosidebar": False,
- "page_width": "80em",
- "show_footer_version": True,
- "show_logo_version": True,
- "sidebar_width": "14em",
- }
+if have_lv2_theme:
+ html_theme = "sphinx_lv2_theme"
+
+ if tags.has("singlehtml"):
+ html_sidebars = {
+ "**": [
+ "globaltoc.html",
+ ]
+ }
+
+ html_theme_options = {
+ "body_max_width": "46em",
+ "body_min_width": "46em",
+ "description": desc,
+ "globaltoc_collapse": False,
+ "globaltoc_maxdepth": 3,
+ "logo_name": True,
+ "nosidebar": False,
+ "page_width": "80em",
+ "show_footer_version": True,
+ "show_logo_version": True,
+ "sidebar_width": "14em",
+ }
+
+ else:
+ html_theme_options = {
+ "body_max_width": "60em",
+ "body_min_width": "46em",
+ "description": desc,
+ "logo_name": True,
+ "nosidebar": True,
+ "page_width": "60em",
+ "show_footer_version": True,
+ "show_logo_version": True,
+ "sidebar_width": "14em",
+ }
else:
- html_theme_options = {
- "body_max_width": "60em",
- "body_min_width": "46em",
- "description": desc,
- "logo_name": True,
- "nosidebar": True,
- "page_width": "60em",
- "show_footer_version": True,
- "show_logo_version": True,
- "sidebar_width": "14em",
- }
+ html_theme = "alabaster"
+ html_static_path = ["@ZIX_SRCDIR@/doc/_static"]
+
+ if tags.has("singlehtml"):
+ html_sidebars = {
+ "**": [
+ "globaltoc.html",
+ ]
+ }
+
+ html_theme_options = {
+ "body_max_width": "48em",
+ "body_min_width": "48em",
+ "description": desc,
+ "globaltoc_collapse": False,
+ "globaltoc_maxdepth": 3,
+ "logo_name": True,
+ "nosidebar": False,
+ "page_width": "80em",
+ "sidebar_width": "16em",
+ }
+
+ else:
+ html_theme_options = {
+ "body_max_width": "60em",
+ "body_min_width": "40em",
+ "description": desc,
+ "logo_name": True,
+ "nosidebar": True,
+ "page_width": "60em",
+ "show_relbars": True,
+ }