From: "Nícolas F. R. A. Prado" <nfraprado@protonmail.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
lkcamp@lists.libreplanetbr.org, andrealmeid@collabora.com
Subject: [PATCH 3/3] docs: Document cross-referencing between documentation pages
Date: Fri, 11 Sep 2020 13:34:46 +0000 [thread overview]
Message-ID: <20200911133339.327721-4-nfraprado@protonmail.com> (raw)
In-Reply-To: <20200911133339.327721-1-nfraprado@protonmail.com>
The syntax to cross-reference between documentation pages wasn't
documented anywhere.
Document the cross-referencing using the new automarkup for
Documentation/... and also Sphinx's doc directive for using relative
paths.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@protonmail.com>
---
Documentation/doc-guide/sphinx.rst | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/Documentation/doc-guide/sphinx.rst b/Documentation/doc-guide/sphinx.rst
index f71ddd592aaa..896478baf570 100644
--- a/Documentation/doc-guide/sphinx.rst
+++ b/Documentation/doc-guide/sphinx.rst
@@ -337,6 +337,23 @@ Rendered as:
- column 3
+Cross-referencing
+-----------------
+
+Cross-referencing from one documentation page to another can be done by passing
+the path to the file starting from the Documentation folder.
+For example, to cross-reference to this page (the .rst extension is optional)::
+
+ See Documentation/doc-guide/sphinx.rst.
+
+If you want to use a relative path, you need to use Sphinx's ``doc`` directive.
+For example, referencing this page from the same directory would be done as::
+
+ See :doc:`sphinx`.
+
+For information on cross-referencing to kernel-doc functions or types, see
+Documentation/doc-guide/kernel-doc.rst.
+
.. _sphinx_kfigure:
Figures & Images
--
2.28.0
next prev parent reply other threads:[~2020-09-11 17:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 13:34 [PATCH 0/3] docs: Add automatic cross-reference for documentation pages Nícolas F. R. A. Prado
2020-09-11 13:34 ` [PATCH 1/3] docs: Allow multiple automarkup functions Nícolas F. R. A. Prado
2020-09-11 13:34 ` [PATCH 2/3] docs: Add automatic cross-reference for documentation pages Nícolas F. R. A. Prado
2020-09-11 13:34 ` Nícolas F. R. A. Prado [this message]
2020-09-16 17:48 ` [PATCH 0/3] " Jonathan Corbet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200911133339.327721-4-nfraprado@protonmail.com \
--to=nfraprado@protonmail.com \
--cc=andrealmeid@collabora.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkcamp@lists.libreplanetbr.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).