doc: guidelines: add target-notes instructions and example

.. target-notes:: is a useful directive that needs to explicitly be
included for a "References" section to really be useful. This commit
updates the doc guidelines accordingly to help ensure that future docs
are using it correctly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2024-10-21 17:49:36 +02:00 committed by Maureen Helm
parent fa0b17e4b1
commit 074c0492ce
1 changed files with 19 additions and 1 deletions

View File

@ -655,6 +655,19 @@ you can reference it with::
Read the `Zephyr Wikipedia Page`_ for more information about the
project.
.. tip::
When a document contains many external links, it can be useful to list them in a single
"References" section at the end of the document. This can be done using the
:rst:dir:`target-notes` directive. Example::
References
==========
.. target-notes::
.. _external_link1: https://example.com
.. _external_link2: https://example.org
Cross-referencing C documentation
=================================
@ -684,7 +697,6 @@ Cross-referencing C documentation
You may provide a custom link text, similar to the built-in :rst:role:`ref` role.
Visual Elements
***************
@ -1213,3 +1225,9 @@ Boards
This directive is used to generate a catalog of Zephyr-supported boards that can be used to
quickly browse the list of all supported boards and filter them according to various criteria.
References
**********
.. target-notes::