@@ -7,9 +7,9 @@ Linking to other documentation pages
7
7
To create a link to another document in our documentation, we use the ``:doc: `` role.
8
8
For example, this link points to the document ``/reference/reference_lua/box_error.rst ``:
9
9
10
- .. code-block :: rst
10
+ .. code-block :: rst
11
11
12
- :doc:`box.error reference </reference/reference_lua/box_error>`
12
+ :doc:`box.error reference </reference/reference_lua/box_error>`
13
13
14
14
Our convention is to put the full path to the referred document so that we can
15
15
easily replace the path if it changes.
@@ -18,12 +18,12 @@ Note that we can omit the ``.rst`` part of the filename.
18
18
You can use the target document's title as the link text.
19
19
To do so, omit the text in the link definition:
20
20
21
- .. literalinclude :: _includes/doc-link.rst
22
- :language: rst
21
+ .. literalinclude :: _includes/doc-link.rst
22
+ :language: rst
23
23
24
24
And you will get this:
25
25
26
- .. include :: _includes/doc-link.rst
26
+ .. include :: _includes/doc-link.rst
27
27
28
28
Linking to labels (anchors)
29
29
---------------------------
@@ -56,24 +56,33 @@ The tag can be anything meaningful. The only guideline is for Tarantool syntax
56
56
items (such as members), where the preferred tag syntax is
57
57
``module_or_object_name dash member_name ``. For example, ``box_space-drop ``.
58
58
59
+ To add a link to an anchor, use the following syntax:
60
+
61
+ .. literalinclude :: _includes/ref-link.rst
62
+ :language: rst
63
+
64
+ The result will be like this:
65
+
66
+ .. include :: _includes/ref-link.rst
67
+
59
68
Linking to external resources
60
69
-----------------------------
61
70
62
71
To make an external link, use the following syntax:
63
72
64
73
.. code-block :: text
65
74
66
- This is a paragraph that contains `a link <http ://example .com/>`_.
75
+ Feel free to report an issue at `Tarantool GitHub <https ://github .com/tarantool/tarantool/issues >`_.
67
76
68
77
Avoid separating the link and the target definition, like this:
69
78
70
79
.. container :: dont
71
80
72
81
.. code-block :: rst
73
82
74
- This is wrong way to make `a link `_.
83
+ Feel free to report an issue at `Tarantool GitHub `_.
75
84
76
- .. _a link: http ://example .com/
85
+ .. _Tarantool GitHub: https ://github .com/tarantool/tarantool/issues
77
86
78
- ** Warning: ** Every separated link tends to cause troubles when this documentation
79
- is translated to other languages. Please avoid using separated links.
87
+ because every separated link tends to cause troubles when this documentation
88
+ is translated to other languages.
0 commit comments