0.1.0 • Published 7 years ago

metalsmith-mdinclude v0.1.0

Weekly downloads
1
License
GPL-3.0
Repository
-
Last release
7 years ago

metalsmith-mdinclude

A 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

Installation

with npm:

$ npm install metalsmith-mdinclude

Usage

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:

# title

#include "doc-build/markdown/built-in/component.md"

And a component.md with this content:

## title 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:

# title

## title 2

some text