Assembles a template file by replacing include directives with the contents of referenced files.
[[include:path/to/file]]._) removed.python tpl_expand.py <template-file>
Template files may contain include directives:
[[include:header.txt]]
Included file paths are resolved relative to the template file’s directory.
Example:
_template.mdpartials/header.mdpartials/footer.mdExample:
_template.mdtemplate.mdstderr and exits with status code 1 if:
Given a template file:
# Documentation
[[include:partials/introduction.md]]
[[include:partials/usage.md]]
Run:
python tpl_expand.py _template.md
Result:
partials/introduction.md and partials/usage.md are inserted into the template.template.md is created in the same directory.