0.2.0 • Published 4 years ago

@karuga/mdast-include v0.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

mdast-include

supports @include directives for mdast

features:

  • recursive includes (include a file which in turn includes another file)
  • include patterns (@include mydir/*.md will 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.md

wildcard 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 \*):

0.2.0

4 years ago

0.1.0

4 years ago