| 1 |
# Copyright 2020-2026 David Robillard <[email protected]> |
| 2 |
# SPDX-License-Identifier: ISC |
| 3 |
|
| 4 |
# Project information |
| 5 |
|
| 6 |
project = "@SRATOM_TITLE@" |
| 7 |
copyright = "2026, David Robillard" |
| 8 |
author = "David Robillard" |
| 9 |
release = "@SRATOM_VERSION@" |
| 10 |
version = "@SRATOM_VERSION@" |
| 11 |
desc = "A small library for serializing LV2 atoms" |
| 12 |
|
| 13 |
# General configuration |
| 14 |
|
| 15 |
exclude_patterns = ["xml"] |
| 16 |
language = "en" |
| 17 |
nitpicky = True |
| 18 |
pygments_style = "friendly" |
| 19 |
|
| 20 |
try: |
| 21 |
import sphinx_lv2_theme |
| 22 |
|
| 23 |
have_lv2_theme = True |
| 24 |
except ModuleNotFoundError: |
| 25 |
have_lv2_theme = False |
| 26 |
|
| 27 |
# Ignore everything opaque or external for nitpicky mode |
| 28 |
_opaque = [ |
| 29 |
"LV2_Atom", |
| 30 |
"LV2_Atom_Forge", |
| 31 |
"LV2_Atom_Forge_Ref", |
| 32 |
"LV2_Atom_Forge_Sink_Handle", |
| 33 |
"LV2_URID_Map", |
| 34 |
"LV2_URID_Unmap", |
| 35 |
"SerdEndSink", |
| 36 |
"SerdEnv", |
| 37 |
"SerdNode", |
| 38 |
"SerdStatementSink", |
| 39 |
"SordModel", |
| 40 |
"SordNode", |
| 41 |
"SordWorld", |
| 42 |
"SratomImpl", |
| 43 |
"uint32_t", |
| 44 |
] |
| 45 |
|
| 46 |
nitpick_ignore = list(map(lambda x: ("c:identifier", x), _opaque)) |
| 47 |
|
| 48 |
# HTML output |
| 49 |
|
| 50 |
html_copy_source = False |
| 51 |
html_short_title = "Sratom" |
| 52 |
html_theme = "sphinx_lv2_theme" |
| 53 |
|
| 54 |
if have_lv2_theme: |
| 55 |
if tags.has("singlehtml"): |
| 56 |
html_sidebars = { |
| 57 |
"**": [ |
| 58 |
"globaltoc.html", |
| 59 |
] |
| 60 |
} |
| 61 |
|
| 62 |
html_theme_options = { |
| 63 |
"body_max_width": "48em", |
| 64 |
"body_min_width": "48em", |
| 65 |
"description": desc, |
| 66 |
"globaltoc_collapse": False, |
| 67 |
"globaltoc_maxdepth": 3, |
| 68 |
"logo_name": True, |
| 69 |
"nosidebar": False, |
| 70 |
"page_width": "80em", |
| 71 |
"show_footer_version": True, |
| 72 |
"show_logo_version": False, |
| 73 |
"sidebar_width": "18em", |
| 74 |
} |
| 75 |
|
| 76 |
else: |
| 77 |
html_theme_options = { |
| 78 |
"body_max_width": "60em", |
| 79 |
"body_min_width": "40em", |
| 80 |
"description": desc, |
| 81 |
"globaltoc_collapse": True, |
| 82 |
"globaltoc_maxdepth": 1, |
| 83 |
"logo_name": True, |
| 84 |
"nosidebar": True, |
| 85 |
"page_width": "60em", |
| 86 |
"show_footer_version": True, |
| 87 |
"show_logo_version": False, |
| 88 |
"sidebar_width": "14em", |
| 89 |
} |
| 90 |
else: |
| 91 |
html_theme = "alabaster" |