Skip to content

Commit 4d0b1a1

Browse files
authored
Clarify links.md (#1447)
* Update links.md * Update links.md * Update links.md * Update links.md * Update links.md
1 parent 5059f86 commit 4d0b1a1

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

docs/syntax/links.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,26 @@ It has two components:
1515

1616
### Internal links
1717

18-
Link between documentation files using either relative or absolute paths.
18+
Link between documentation pages in the same repository using the file’s relative or absolute path. The path must include the `.md` file extension. Optionally append an anchor to send readers to a specific section on a page. Never use a full URL for links between documentation pages.
1919

2020
#### Relative paths
21-
Navigate relative to the current file's location:
21+
22+
Use relative paths to link to other pages inside the same repository.
2223

2324
```markdown
24-
[Security documentation](../security/index.md)
25+
[Security docs](../security/index.md)
2526

26-
[Monitoring guide](monitor/index.md)
27+
[Install](monitor/index.md#installation)
2728
```
2829

2930
#### Absolute paths
3031

31-
You can also use absolute paths to link to pages within the same repository.
32-
Say you're working on a random page somewhere in the `docs-content` repo. You can link to a page in the `deploy-manage` section like this:
32+
Use absolute paths to link to other pages inside the same repository.
3333

3434
```markdown
35-
[API Keys](/deploy-manage/api-keys.md)
35+
[API keys](/deploy-manage/api-keys.md)
36+
37+
[Authentication](/deploy-manage/api-keys.md#authentication)
3638
```
3739

3840
Note the leading `/` before the path.
@@ -90,6 +92,8 @@ The syntax follows the format `<scheme>://<path>`, where:
9092
The `path` in cross-repo links must be relative to the `docset.yml` file and not the full path within the repo
9193
:::
9294

95+
Never use a full URL for links across documentation repositories.
96+
9397
### External links
9498

9599
Link to websites and resources outside the Elastic docs:

0 commit comments

Comments
 (0)