This MkDocs plugin includes files in your markdown documents.
Install the plugin using pip:
pip install git+https://github.com/RedisLabs/mkdocs-include.git
Activate the plugin in mkdocs.yml
:
plugins:
- search
- include:
src_path: docs/sources
Note: If you have no
plugins
entry in your config file yet, you'll likely also want to add thesearch
plugin. MkDocs enables it by default if there is noplugins
entry set, but now you have to enable it explicitly.
More information about plugins in the [MkDocs documentation][mkdocs-plugins].
src_path
- The path to your source files
Assuming you have a file at "docs/sources/hello.c" and that the src_path
property is set to "docs/sources" add the following to your .md file to include it:
{{ include('hello.c') }}