docs: Add automatic cross-reference for documentation pages
authorNícolas F. R. A. Prado <nfraprado@protonmail.com>
Fri, 11 Sep 2020 13:34:39 +0000 (13:34 +0000)
committerJonathan Corbet <corbet@lwn.net>
Wed, 16 Sep 2020 17:09:51 +0000 (11:09 -0600)
commitd18b01789ae5abba2ce8dd23c984926eca3925a9
tree30a4208d0eb4f70b34f87eb3e60183718676a303
parent1ac4cfb2ce03e1a7382c64fe73c9e16c0acc20db
docs: Add automatic cross-reference for documentation pages

Cross-referencing to other documentation pages is possible using the
:doc:`doc-file` directive from Sphinx.

Add automatic markup for references to other documentation pages in the
format Documentation/subfolder/doc-file.rst (the extension being
optional).
This requires that the path be passed all the way from the Documentation
folder, which can be longer than passing a relative path through the
:doc: directive, but avoids the markup, making the text cleaner when
read in plain text.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@protonmail.com>
Link: https://lore.kernel.org/r/20200911133339.327721-3-nfraprado@protonmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/sphinx/automarkup.py