]> www.infradead.org Git - users/dwmw2/qemu.git/commit
doc/sphinx/hxtool.py: add optional label argument to SRST directive xenfv-net-4
authorDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 6 Nov 2023 13:34:05 +0000 (13:34 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 26 Jan 2024 17:19:04 +0000 (17:19 +0000)
commit7f23b27e4fa0f203c476d562f909600f287db481
tree50ab72d75df229f43198ba0ccf5e38f10c0ce722
parentea1d896cd0b6c0051f96fbe2ba6b6b3b344a8c33
doc/sphinx/hxtool.py: add optional label argument to SRST directive

We can't just embed labels directly into files like qemu-options.hx which
are included from multiple top-level RST files, because Sphinx sees the
labels as duplicate: https://github.com/sphinx-doc/sphinx/issues/9707

So add an 'emitrefs' option to the Sphinx hxtool-doc directive, which is
set only in invocation.rst and not from the HTML rendition of the man
page. Along with an argument to the SRST directive which causes a label
of the form '.. _BASENAME-LABEL:' to be emitted when the emitrefs option
is set, where BASENAME is the name of the .hx file and LABEL is the text
provided within the parentheses of the SRST() directive.

Now where the Xen PV documentation refers to the documentation for the
-initrd command line option, it can emit a link directly to it.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
docs/devel/docs.rst
docs/sphinx/hxtool.py
docs/system/i386/xen.rst
docs/system/invocation.rst
qemu-options.hx