[llvm-dev] External references in .rst documentation files

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 14 14:23:13 PDT 2020


Am Fr., 14. Aug. 2020 um 11:24 Uhr schrieb Paul C. Anagnostopoulos via
llvm-dev <llvm-dev at lists.llvm.org>:

> :doc:`Title <TableGen/ProgRef>`
>

A link to another document with a path relative to the current document.
Title is the <a href="...">caption</a> of the link.


> :doc:`../CodeGenerator`
>


A link to another document with a path relative to the current document.
The linked document's title is used for the caption.


>
> `Title <https://clang.llvm.org/docs/...>`_
>

A link to an arbitrary URL. Please avoid for cross-references as it should
change relative to where the documents are. For instance, each the
documentation of each release should link to the version of its release
(e.g. https://releases.llvm.org/10.0.0/tools/clang/docs/index.html), not
the latest from trunk (e.g. https://clang.llvm.org/docs/index.html)


> I had no luck searching online. If it matters, I'm adding cross-references
> between TableGen documents that are all in the same docs/ TableGen
> directory.
>

reStructured Text documentation is available at:

https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#hyperlinks
https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-doc
.

The :ref: role is useful as well.


Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200814/1bbc5ffc/attachment.html>


More information about the llvm-dev mailing list