0.2.0 • Published 6 years ago
@karuga/mdast-include v0.2.0
mdast-include
supports @include directives for mdast
features:
- recursive includes (include a file which in turn includes another file)
- include patterns (
@include mydir/*.mdwill include all matching files)
downsides:
- this operates after parsing is done
- syntax restrictions (e.g. there must be blank lines before and after a block of imports)
alternatives (remark-based):
usage
simple imports:
@import foo.md
@import bar/baz.mdwildcard imports:
<!-- prettier-ignore-start -->
@import bar/*.md
<!-- prettier-ignore-end -->note: code formatters (like prettier) may have to be disabled (e.g. to prevent replacing * with \*):