summary refs log tree commit diff stats
path: root/docs/conf.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2025-03-13 00:43:09 -0400
committerMarkus Armbruster <armbru@redhat.com>2025-03-14 07:32:41 +0100
commit25d44f57e17b088fdc4e38042e04c4e9da2c1088 (patch)
treedc13a8db516ab9c34aea9002809920b4d87aa2ac /docs/conf.py
parent7127e14f15fc52b436eb63e482a9f117bd4346d2 (diff)
downloadfocaccia-qemu-25d44f57e17b088fdc4e38042e04c4e9da2c1088.tar.gz
focaccia-qemu-25d44f57e17b088fdc4e38042e04c4e9da2c1088.zip
docs/qapi-domain: add namespaced index support
Generate an index-per-namespace for the QAPI domain. Due to a limitation
with Sphinx's architecture, these indices must be defined during setup
time and cannot be dynamically created on-demand when a namespace
directive is encountered.

Owing to that limitation, add a configuration value to conf.py that
specifies which QAPI namespaces we'll generate indices for.

Indices will be named after their namespace, e.g. the "QMP" namespace
will generate to "qapi-qmp-index.html" and can be referenced using
`qapi-qmp-index`.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20250313044312.189276-9-jsnow@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py
index a3f9fa63d9..175491148c 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -161,6 +161,9 @@ qapi_allowed_fields = {
     "see also",
 }
 
+# Due to a limitation in Sphinx, we need to know which indices to
+# generate in advance. Adding a namespace here allows that generation.
+qapi_namespaces = set()
 
 # -- Options for HTML output ----------------------------------------------