Skip to content

Commit 114a418

Browse files
theletterfvishaangelovaMpdreamz
authored
Update links.md to add reference-style links (#1326)
* Update links.md to add reference-style links This adds a section on reference-style links to the docs. * Update links.md * Update links.md * Update links.md * Update links.md * Update links.md * Update links.md * Update docs/syntax/links.md Co-authored-by: Visha Angelova <[email protected]> * Update links.md * Update docs/syntax/links.md Co-authored-by: Martijn Laarman <[email protected]> --------- Co-authored-by: Visha Angelova <[email protected]> Co-authored-by: Martijn Laarman <[email protected]>
1 parent 0cf0cd3 commit 114a418

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

docs/syntax/links.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Links
22

3-
A markdown link looks like this:
3+
A Markdown link looks like this:
44

55
```markdown
66
[Link text](destination.md)
77
```
8+
89
It has two components:
10+
911
- Link **text** enclosed in square brackets `[ ]`
1012
- Link **destination** enclosed in parentheses `( )`
1113

@@ -133,6 +135,41 @@ You can also auto-generate text for specific headings within files:
133135
<!-- Uses the "Configuration" section title from current file -->
134136
```
135137

138+
## Reference-style links
139+
140+
`docs-builder` supports reference-style external links.
141+
142+
::::{tab-set}
143+
144+
:::{tab-item} Output
145+
146+
- [Link]: This link uses the reference name as text.
147+
- [Your own text][Link]: This link overrides the reference name.
148+
149+
% References are typically added at the bottom of the page
150+
151+
[Link]: https://elastic.co/docs
152+
153+
:::
154+
155+
:::{tab-item} Markdown
156+
157+
```markdown
158+
- [Link]: This link uses the reference name as text.
159+
- [Your own text][Link]: This link overrides the reference name.
160+
161+
% References are typically added at the bottom of the page
162+
163+
[Link]: https://elastic.co/docs
164+
```
165+
166+
:::
167+
168+
169+
::::
170+
171+
Reference-style links are useful when adding links to tables, for example, or to update frequently used links more easily. Place them at the end of the document to simplify their management.
172+
136173
## Legacy features
137174

138175
### Inline anchors

0 commit comments

Comments
 (0)