Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Include (::include)

You can include a single .md file, or a folder of .md files, using the ::include directive.

Including a file

We support the following syntax for including the contents of another Markdown file:

Markdown
::include[<filepath>]

The filepath is relative to the docs/web/includes/ directory, and the included file must exist within that directory. Any included files defined inside the file will also be included.

warning

It is critical that there are no circular dependencies of included files.

For example, in include-1.md:

Markdown
::include[include-2.md]

If in include-2.md, you were to include include-1.md:

Markdown
::include[include-1.md]

This would yield a circular dependency, resulting in build errors.

Including a folder

A path ending in / includes every Markdown (.md) file directly in that folder, in filename order:

Markdown
::include[<folderpath>/]

The folderpath is relative to the docs/web/includes/ folder.

Only .md files directly in the folder are included. Non-.md files and subfolders are ignored — folder includes are not recursive, so .md files in nested subfolders are not included. Use the optional order attribute to control the order:

  • order=asc (default): filename ascending.
  • order=desc: filename descending.
Markdown
::include[<folderpath>/]{order=desc}

For example:

Markdown
::include[product-release-notes/2026/07/]{order=desc}

Inlines every .md file in docs/web/includes/product-release-notes/2026/07/, newest first (by filename). See docs/web/includes/product-release-notes/README.md for how the product release notes use this.

Each file in the folder is included the same way as a single ::include, so nested includes and the circular-dependency rule above apply to folder members too.

Examples

File example

Assuming docs/web/includes/preview.md has content

Markdown
:::info[Preview]

This feature is in Public Preview.

:::
Markdown
::include[preview.md]

Output:

Preview

This feature is in Public Preview.

Folder example

Assuming a folder, docs/web/includes/an-include-folder/, has two .md files within it:

file1.md:

Markdown
Some text in file1.md

file2.md:

Markdown
Some text in file2.md
Markdown
::include[an-include-folder/]{order=desc}

Output:

Markdown
Some text in file2.md

Some text in file1.md