mirror-linux/Documentation/admin-guide/device-mapper
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
..
cache-policies.rst Documentation: admin-guide: correct spelling 2023-02-02 11:04:42 -07:00
cache.rst
delay.rst docs: device-mapper: fixed spelling mistakes in documentation 2025-08-19 11:12:50 +02:00
dm-clone.rst dm: add clone target 2019-09-12 09:32:31 -04:00
dm-crypt.rst dm-crypt: Document integrity_key_size option. 2025-02-03 14:10:10 +01:00
dm-dust.rst dm dust: add interface to list all badblocks 2020-07-20 11:17:41 -04:00
dm-ebs.rst Documentation: admin-guide: correct spelling 2023-02-02 11:04:42 -07:00
dm-flakey.rst dm flakey: introduce random_read_corrupt and random_write_corrupt options 2023-06-16 18:24:13 -04:00
dm-ima.rst dm ima: update dm documentation for ima measurement support 2021-08-20 16:07:37 -04:00
dm-init.rst dm init: add dm-mod.waitfor to wait for asynchronously probed block devices 2022-12-02 17:37:45 -05:00
dm-integrity.rst dm-integrity: Document Inline mode for storing integrity data 2025-02-03 14:10:10 +01:00
dm-io.rst
dm-log.rst
dm-pcache.rst dm-pcache: add persistent cache target in device-mapper 2025-08-25 15:25:29 +02:00
dm-queue-length.rst
dm-raid.rst dm raid: add documentation for takeover/reshape raid1 -> raid5 table line examples 2025-12-10 19:28:22 +01:00
dm-service-time.rst
dm-uevent.rst
dm-zoned.rst Documentation: admin-guide: correct spelling 2023-02-02 11:04:42 -07:00
era.rst
index.rst Documentation: use a source-read extension for the index link boilerplate 2026-01-23 11:59:34 -07:00
kcopyd.rst
linear.rst
log-writes.rst
persistent-data.rst
snapshot.rst
statistics.rst
striped.rst
switch.rst
thin-provisioning.rst dm-thin: update the documentation 2025-07-31 15:43:30 +02:00
unstriped.rst Documentation: admin-guide: correct spelling 2023-02-02 11:04:42 -07:00
vdo-design.rst docs: device-mapper: fix typos in delay.rst and vdo-design.rst 2025-08-19 11:12:49 +02:00
vdo.rst dm-vdo: Promote dm-vdo title to title heading 2025-08-19 11:12:50 +02:00
verity.rst dm verity fec: Expose corrected block count via status 2025-11-18 18:24:26 +01:00
writecache.rst dm writecache: count number of blocks discarded, not number of discard bios 2022-07-14 15:54:46 -04:00
zero.rst