From 25d44f57e17b088fdc4e38042e04c4e9da2c1088 Mon Sep 17 00:00:00 2001 From: John Snow Date: Thu, 13 Mar 2025 00:43:09 -0400 Subject: 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 Message-ID: <20250313044312.189276-9-jsnow@redhat.com> Acked-by: Markus Armbruster Signed-off-by: Markus Armbruster --- docs/conf.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/conf.py') 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 ---------------------------------------------- -- cgit 1.4.1