File: conf.py.in

package info (click to toggle)
serd 0.32.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,816 kB
  • sloc: ansic: 7,229; python: 518; makefile: 5
file content (120 lines) | stat: -rw-r--r-- 2,627 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Copyright 2020-2025 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: ISC

# Project information

project = "@SERD_TITLE@"
copyright = "2022-2025, David Robillard"
author = "David Robillard"
release = "@SERD_VERSION@"
version = "@SERD_VERSION@"
desc = "A lightweight library for working with RDF"

# General configuration

exclude_patterns = ["xml"]
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",
    "SerdEnvImpl",
    "SerdReaderImpl",
    "SerdWriterImpl",
    "int64_t",
    "size_t",
    "uint32_t",
    "uint8_t",
    "va_list",
]

nitpick_ignore = list(map(lambda x: ("c:identifier", x), _opaque))

# HTML output

html_copy_source = False
html_secnumber_suffix = " "
html_short_title = "@SERD_TITLE@"
html_static_path = ["@SERD_SRCDIR@/doc/_static"]

html_theme_options = {
    "description": desc,
    "logo": "serd.svg",
    "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.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,
        }