File inclusion
File inclusion is useful for
- including entire pages in a content set (usually done in the
docset.ymlfile) - breaking files into smaller units and including them where appropriate
If there are portions of content that are relevant to multiple pages, you can inject content from another file into any given MD file using the include directive.
Note
Files to be included must live in a _snippets folder to be considered a snippet file. This folder can live anywhere.
:::{include} _snippets/reusable-snippet.md
:::
This is a snippet included on "File inclusion".
Tip
This is a snippet
To link to a heading with a custom anchor (ID) defined in a snippet, target the parent file + anchor.
For example:
[my favorite esql function](parent-file.md#id-from-included-snippet)
include::shared-monitor-config.asciidoc[]