Skip to content

Commit 34baf43

Browse files
authored
[DOCS] Update file_inclusion.md for linking to snippets with custom anchors (#564)
* Update file_inclusion.md for linking to snippets with custom anchors * Fix link, tidy * meta * never work in the GitHub UI
1 parent 8d6c67a commit 34baf43

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/syntax/file_inclusion.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ Files to be included must live in a `_snippets` folder to be considered a snippe
2020
:::{include} _snippets/reusable-snippet.md
2121
:::
2222

23+
#### Linking to snippets with custom anchors
24+
25+
To link to a heading with a [custom anchor (ID)](./headings.md#custom-anchor-links) defined in a snippet, target the parent file + anchor.
26+
27+
For example:
28+
29+
```markdown
30+
[my favorite esql function](parent-file.md#id-from-included-snippet)
31+
```
32+
2333
### Asciidoc syntax
2434

2535
```asciidoc

0 commit comments

Comments
 (0)