summaryrefslogtreecommitdiffstats
path: root/doc/conf.py.in
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-14 20:03:30 -0400
committerDavid Robillard <d@drobilla.net>2023-05-14 20:03:30 -0400
commitd564baafed0863813a87d872f8663134e74228c8 (patch)
tree69c80abc4ed6d011beac6a2904938830024dc220 /doc/conf.py.in
parent99540a8f30408d15339ececc4c28f27e2e2f06ab (diff)
downloadlilv-d564baafed0863813a87d872f8663134e74228c8.tar.gz
lilv-d564baafed0863813a87d872f8663134e74228c8.tar.bz2
lilv-d564baafed0863813a87d872f8663134e74228c8.zip
Clean up documentation and remove junk files from install
Diffstat (limited to 'doc/conf.py.in')
-rw-r--r--doc/conf.py.in121
1 files changed, 83 insertions, 38 deletions
diff --git a/doc/conf.py.in b/doc/conf.py.in
index b53e9ca..444b70a 100644
--- a/doc/conf.py.in
+++ b/doc/conf.py.in
@@ -3,10 +3,12 @@
# Project information
-project = "Lilv"
-copyright = "2020, David Robillard"
+project = "@LILV_TITLE@"
+copyright = "2020-2023, David Robillard"
author = "David Robillard"
release = "@LILV_VERSION@"
+version = "@LILV_VERSION@"
+desc = "A library for loading LV2 plugins"
# General configuration
@@ -15,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",
@@ -41,42 +50,78 @@ nitpick_ignore = list(map(lambda x: ("c:identifier", x), _opaque))
# HTML output
-html_theme = "sphinx_lv2_theme"
html_copy_source = False
-html_short_title = "Lilv"
-
-if tags.has('singlehtml'):
- html_sidebars = {
- "**": [
- "globaltoc.html",
- ]
- }
-
- html_theme_options = {
- "body_max_width": "65em",
- "body_min_width": "50em",
- "description": "A library for loading LV2 plugins",
- "show_footer_version": True,
- "show_logo_version": False,
- "logo_name": True,
- "nosidebar": False,
- "page_width": "80em",
- "sidebar_width": "11em",
- "globaltoc_maxdepth": 3,
- "globaltoc_collapse": False,
- }
+html_secnumber_suffix = " "
+html_short_title = "@LILV_TITLE@"
+
+html_theme_options = {
+ "description": desc,
+ "logo_name": True,
+ "logo_width": "8em",
+}
+if tags.has("singlehtml"):
+ html_sidebars = {"**": ["globaltoc.html"]}
+ html_theme_options.update(
+ {
+ "globaltoc_collapse": False,
+ "globaltoc_maxdepth": 3,
+ "nosidebar": False,
+ "page_width": "80em",
+ }
+ )
else:
- html_theme_options = {
- "body_max_width": "60em",
- "body_min_width": "40em",
- "description": "A library for loading LV2 plugins",
- "show_footer_version": True,
- "show_logo_version": False,
- "logo_name": True,
- "nosidebar": True,
- "page_width": "60em",
- "sidebar_width": "14em",
- "globaltoc_maxdepth": 1,
- "globaltoc_collapse": True,
- }
+ html_theme_options.update(
+ {
+ "globaltoc_collapse": True,
+ "globaltoc_maxdepth": 1,
+ "nosidebar": True,
+ "page_width": "60em",
+ }
+ )
+
+if have_lv2_theme:
+ html_theme = "sphinx_lv2_theme"
+
+ html_theme_options.update(
+ {
+ "show_footer_version": True,
+ "show_logo_version": True,
+ }
+ )
+
+ if tags.has("singlehtml"):
+ html_theme_options.update(
+ {
+ "body_max_width": "64em",
+ "body_min_width": "64em",
+ "nosidebar": False,
+ "sidebar_width": "12em",
+ }
+ )
+
+ else:
+ html_theme_options.update(
+ {
+ "body_max_width": "60em",
+ "body_min_width": "40em",
+ }
+ )
+
+else:
+ html_theme = "alabaster"
+
+ if tags.has("singlehtml"):
+ html_theme_options = {
+ "body_max_width": "58em",
+ "body_min_width": "40em",
+ "sidebar_width": "16em",
+ }
+
+ else:
+ html_theme_options = {
+ "body_max_width": "60em",
+ "body_min_width": "40em",
+ "nosidebar": True,
+ "show_relbars": True,
+ }