Skip to content

[Contributing] Document :ref: links #18926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions contributing/documentation/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,28 @@ If you want to modify that title, use this alternative syntax:

:doc:`environments`

It is also possible to link to a specific section, instead of a whole page.
First, define a target above section you will link to:

.. code-block:: rst

# /service_container/autowiring.rst

# Define the target
.. _autowiring-calls:

Autowiring other Methods (e.g. Setters and Public Typed Properties)
-------------------------------------------------------------------
[section content ...]

Then create reference to link to that section from another file:

.. code-block:: rst

# /reference/attributes.rst

:ref:`Required <autowiring-calls>`

**Links to the API** follow a different syntax, where you must specify the type
of the linked resource (``class`` or ``method``):

Expand Down