mirror-linux/Documentation/driver-api/firmware
Jani Nikula a592a36e49 Documentation: use a source-read extension for the index link boilerplate
The root document usually has a special :ref:`genindex` link to the
generated index. This is also the case for Documentation/index.rst. The
other index.rst files deeper in the directory hierarchy usually don't.

For SPHINXDIRS builds, the root document isn't Documentation/index.rst,
but some other index.rst in the hierarchy. Currently they have a
".. only::" block to add the index link when doing SPHINXDIRS html
builds.

This is obviously very tedious and repetitive. The link is also added to
all index.rst files in the hierarchy for SPHINXDIRS builds, not just the
root document.

Put the boilerplate in a sphinx-includes/subproject-index.rst file, and
include it at the end of the root document for subproject builds in an
ad-hoc source-read extension defined in conf.py.

For now, keep having the boilerplate in translations, because this
approach currently doesn't cover translated index link headers.

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
[jc: did s/doctree/kern_doc_dir/ ]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260123143149.2024303-1-jani.nikula@intel.com>
2026-01-23 11:59:34 -07:00
..
efi docs: efi: add CPER functions to driver-api 2025-11-21 09:42:03 +01:00
built-in-fw.rst Documentation/driver-api: firmware/built-in-fw: drop doubled word 2020-07-10 14:58:00 +02:00
core.rst docs: driver-api: firmware: add driver firmware guidelines. (v3) 2022-07-28 10:57:18 +02:00
direct-fs-lookup.rst Documentation/driver-api: firmware/direct-fs-lookup: drop doubled word 2020-07-10 14:58:01 +02:00
fallback-mechanisms.rst docs: driver-api: firmware: fallback-mechanisms: Fix rendering of bullet point 2020-09-08 13:32:06 +02:00
firmware-usage-guidelines.rst docs: driver-api: firmware: clarify userspace requirements 2025-03-17 17:04:32 -06:00
firmware_cache.rst Documentation/driver-api: firmware/firmware_cache: drop doubled word 2020-07-10 14:58:00 +02:00
fw_search_path.rst Documentation: firmware: Clarify firmware path usage 2023-04-11 16:20:20 -06:00
fw_upload.rst docs: driver-api: firmware_loader: fix missing argument in usage example 2023-03-29 16:09:39 +02:00
index.rst Documentation: use a source-read extension for the index link boilerplate 2026-01-23 11:59:34 -07:00
introduction.rst
lookup-order.rst
other_interfaces.rst firmware: sysfb: Add sysfb_disable() helper function 2022-06-29 09:51:41 +02:00
request_firmware.rst Documentation/driver-api: firmware/request_firmware: drop doubled word 2020-07-10 14:58:01 +02:00