a plugin to enable importing markdown files using markdown-include lib
npm install metalsmith-mdincludeA Metalsmith plugin that let you use an include statement within your markdown files.
It's based on markdown-include project:
https://github.com/sethen/markdown-include
with npm:
``bash`
$ npm install metalsmith-mdinclude
`javascript
const Metalsmith = require('metalsmith')
const mdinclude = require('metalsmith-mdinclude')
var metalsmith = new Metalsmith(__dirname)
.use(mdinclude())
`
you could have a markdown document in doc-build/markdown/extended/component-overview.md with this content:
`markdowntitle
#include "doc-build/markdown/built-in/component.md"
`
And a component.md with this content:
`markdowntitle 2
some text
`
this means you have a doc-build directory at your root project, then you'll have a markdown processed chunk within this result once you execute metalsmith:
`markdowntitle
some text
``