Includes/snippets are not yet enabled by default for all repos because we’re still testing localization effects. Let the SCCM team know if you want to try using includes/snippets in your repo.
Use includes and snippets to share content among multiple articles within a repo. At this time, includes and snippets work only within a repo.
#
heading) into a different file. Create .md files in the help > _includes
folder, and reference them from any article in the repo.markdown.md
file in the help > _includes
folder.The key difference between a snippet and an include is that an include can have headings. A snippet cannot have headings.
If necessary, create an _includes
directory in the help
directory.
Create a markdown file in the _includes
directory with the content you want to share.
In this source markdown file, any metadata and the H1 (# Title
) is ignored. Everything after the H1 is included when referenced.
On a blank line in the target article, add a reference to the source include file in this format:
{{$include /help/_includes/legal-blurb.md}}
Commit the content and preview it.
If your repo is enabled for includes, make sure that you escape any {{
or }}
characters in files that do not reference include files.
For sharing smaller sections of text, you can create a snippets.md file and reference the H2 anchors. Snippets cannot include headings. If you need to include headings in your shared text, use includes.
Create a snippets.md
file in the help > _includes
directory.
Create a dummy H1 title.
For each shared section, create a Heading 2 with an anchor to be used to reference the snippet. Example:
## Premium note {#premium-note}
>[!NOTE]
>
>This feature is available as part of the Target Premium solution. It is not available in Target Standard without a Target Premium license.
In the target article, add a reference to the snippets.md file in this format:
{{premium-note}}
Commit the content and preview it.
If your repo is enabled for snippets, make sure that you escape any {{
or }}
characters in files that do not reference snippets.