Include Markdown¶
Use the Mkdocs Markdown includer plugin to including Markdown (or actually any type of textual content) from an external file into the body of another Markdown file.
Paths of included files can be absolute or relative to the path of the file that includes them. This argument also accept globs, in which case certain paths can be ignored using the exclude argument.
To include content declare a block enclosed by {! and !} and use the include-markdown argument to define the path to the content to include. Use the start and end arguments to define delimeters that mark the start and the end of the content to include.
The following content is included from the file `../includes/exampleInclude.md`.
(!
include-markdown "../includes/exampleInclude.md"
start="<!--include-start-->"
end="<!--include-end-->"
comments=true
!)
Failure
Please note that the ( and ) included in the syntax example must be { and }. I failed to escape this code and because of that the mkdocs-include-markdown-plugin will execute the code and renders the example useless.
Result
The following content is included from the file ../includes/exampleInclude.md.
This text is included by the mkdocs-include-markdown-plugin