From fd4e3df97f7ed16a60f38eb3beb37256a68a66c4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 7 Jan 2021 00:23:09 +0100 Subject: Switch to LV2 documentation theme --- doc/_static/custom.css | 95 ----------------------------------------------- doc/_templates/about.html | 57 ---------------------------- doc/c/wscript | 4 +- doc/conf.py.in | 70 +++++++++++++++++----------------- 4 files changed, 35 insertions(+), 191 deletions(-) delete mode 100644 doc/_static/custom.css delete mode 100644 doc/_templates/about.html (limited to 'doc') diff --git a/doc/_static/custom.css b/doc/_static/custom.css deleted file mode 100644 index 60aa759..0000000 --- a/doc/_static/custom.css +++ /dev/null @@ -1,95 +0,0 @@ -div.document { - margin: 0; -} - -div.body { - margin-top: 2em; -} - -div.sphinxsidebarwrapper { - background: #EEE; -} - -div.sphinxsidebarwrapper p.blurb { - text-align: center; -} - -div.sphinxsidebarwrapper span.logo { - display: block; - text-align: center; - font-family: Georgia, serif; - padding: 0; - font-size: 180%; -} - -div.sphinxsidebar a { - border-width: 0; -} - -div.sphinxsidebar li { - color: #444; -} - -div.section { - margin-top: 2.5em; -} - -a.reference { - border-bottom: none; -} - -code.xref { - font-weight: normal; - background-color: #F8F8F8; - padding: 0.1em 0 0.1em 0; -} - -div.section > dl.c > dt:first-child, -div.section > dl.cpp > dt:first-child { - background-color: #F8F8F8; - font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; - font-size: 0.9em; - font-weight: normal; - margin-bottom: 0.5em; - padding: 0.1em 0 0.1em 0; -} - -tt.descname, tt.descclassname, code.descname, code.descclassname { - font-size: 0.9em; -} - -dl.member { - margin-top: 0.5em; -} - -dl.enumerator { - margin-top: 0.5em; -} - -dl.field-list > dt { - padding-left: 0; -} - -pre, tt, code { - background-color: #F8F8F8; -} - -.toctree-l1 { - margin-top: 1.0em; -} - -img.logo { - width: 6em; -} - -.class { - padding-top: 1.5em; -} - -.exception { - padding-top: 1.5em; -} - -.class > dd > dl.function { - padding-top: 1.0em; -} diff --git a/doc/_templates/about.html b/doc/_templates/about.html deleted file mode 100644 index 5bbadbe..0000000 --- a/doc/_templates/about.html +++ /dev/null @@ -1,57 +0,0 @@ -{% if theme_logo %} - -{% else %} -

{{ project }}

-{% endif %} - -{% if theme_description %} -

{{ theme_description }}

-{% endif %} - -{% if theme_github_user and theme_github_repo %} -{% if theme_github_button|lower == 'true' %} -

- -

-{% endif %} -{% endif %} - -{% if theme_travis_button|lower != 'false' %} -{% if theme_travis_button|lower == 'true' %} - {% set path = theme_github_user + '/' + theme_github_repo %} -{% else %} - {% set path = theme_travis_button %} -{% endif %} -

- - https://secure.travis-ci.org/{{ path }}.svg?branch={{ theme_badge_branch }} - -

-{% endif %} - -{% if theme_codecov_button|lower != 'false' %} -{% if theme_codecov_button|lower == 'true' %} - {% set path = theme_github_user + '/' + theme_github_repo %} -{% else %} - {% set path = theme_codecov_button %} -{% endif %} -

- - https://codecov.io/github/{{ path }}/coverage.svg?branch={{ theme_badge_branch }} - -

-{% endif %} diff --git a/doc/c/wscript b/doc/c/wscript index e0cf3bb..ae074bc 100644 --- a/doc/c/wscript +++ b/doc/c/wscript @@ -5,8 +5,6 @@ def build(bld): index_xml = bld.path.get_bld().make_node("xml/index.xml") files = [ - ("../_static/custom.css", "sphinx/_static/custom.css"), - ("../_templates/about.html", "sphinx/_templates/about.html"), ("../suil.rst", "sphinx/suil.rst"), ("index.rst", "sphinx/index.rst"), ("overview.rst", "sphinx/overview.rst"), @@ -37,5 +35,5 @@ def build(bld): bld(features="sphinx", sphinx_source=bld.path.get_bld().make_node("sphinx"), sphinx_output_format="singlehtml", - sphinx_options=["-E", "-q"], + sphinx_options=["-E", "-q", "-t", "singlehtml"], install_path=doc_dir + "c/singlehtml/") diff --git a/doc/conf.py.in b/doc/conf.py.in index cf81c5d..4741de3 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -7,14 +7,12 @@ release = "@SUIL_VERSION@" # General configuration +exclude_patterns = ["xml"] language = "en" +nitpicky = True +pygments_style = "friendly" -extensions = [ - # 'sphinx_rtd_theme', -] - -# Enable nitpicky mode to get warnings about broken links -# Unfortunately this means we need to explicitly ignore everything external +# Ignore everything opaque or external for nitpicky mode nitpicky = True _opaque = [ "LV2_Feature", @@ -25,45 +23,45 @@ _opaque = [ nitpick_ignore = list(map(lambda x: ("c:identifier", x), _opaque)) -templates_path = ["_templates"] - -pygments_style = "friendly" - # HTML output -exclude_patterns = ["xml"] html_static_path = ["_static"] +html_theme = "sphinx_lv2_theme" +html_copy_source = False +html_short_title = "Suil" -html_theme = "alabaster" -# html_theme = "sphinx_rtd_theme" - -if html_theme == "alabaster": - - html_theme_options = { - "description": "A library for loading LV2 plugin UIs", - "donate_url": "http://drobilla.net/pages/donate.html", - # "github_repo": "suil", - # "github_user": "lv2", - # "logo": "suil.svg", - "logo_name": True, - "logo_text_align": "center", - "page_width": "80em - 20em", - "sidebar_width": "20em", - } - +if tags.has("singlehtml"): html_sidebars = { "**": [ - "about.html", - "localtoc.html", - "donate.html", + "globaltoc.html", ] } -elif html_theme == "sphinx_rtd_theme": + html_theme_options = { + "body_max_width": "48em", + "body_min_width": "48em", + "description": "A library for loading LV2 plugin UIs", + "globaltoc_collapse": False, + "globaltoc_maxdepth": 3, + "logo_name": True, + "nosidebar": False, + "page_width": "80em", + "show_footer_version": True, + "show_logo_version": False, + "sidebar_width": "18em", + } +else: html_theme_options = { - "sticky_navigation": False, - "collapse_navigation": False, - "navigation_depth": 4, - "display_version": True, + "body_max_width": "60em", + "body_min_width": "40em", + "description": "A library for loading LV2 plugin UIs", + "globaltoc_collapse": True, + "globaltoc_maxdepth": 1, + "logo_name": True, + "nosidebar": True, + "page_width": "60em", + "show_footer_version": True, + "show_logo_version": False, + "sidebar_width": "14em", } -- cgit v1.2.1