linux/Documentation/fb
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
..
api.rst media: docs: move uAPI book to userspace-api/media 2020-04-14 10:31:49 +02:00
arkfb.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
aty128fb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
cirrusfb.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
cmap_xfbdev.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
deferred_io.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
efifb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
ep93xx-fb.rst Documentation: fb: ep93xx: Demote section headings 2025-10-02 22:10:03 +02:00
fbcon.rst Documentation: fbcon: Use admonition directives 2025-09-18 10:36:52 -06:00
framebuffer.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
gxfb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
index.rst Documentation: use a source-read extension for the index link boilerplate 2026-01-23 11:59:34 -07:00
intel810.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
internals.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
lxfb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
matroxfb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
metronomefb.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
modedb.rst drm/modes: Introduce more named modes 2022-11-24 12:42:40 +01:00
pvr2fb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
pxafb.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
s3fb.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
sa1100fb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
sh7760fb.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
sisfb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
sm501.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
sm712fb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
sstfb.rst fbdev: sstfb.rst: Fix spelling mistake 2025-05-31 10:24:02 +02:00
tgafb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
tridentfb.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
udlfb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
uvesafb.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
vesafb.rst Documentation: fb: Retitle driver docs 2025-10-02 22:10:03 +02:00
viafb.modes Documentation/fb/viafb.modes fix a typo 2013-08-20 12:41:11 +02:00
viafb.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00
vt8623fb.rst docs: fb: convert docs to ReST and rename to *.rst 2019-06-14 14:21:11 -06:00