assemble-markdown-import

An Assemble plugin for importing and parsing of markdown from data sources.


Keywords
assemble, assembleplugin, blog generator, blog, boilerplate, boilerplates, bootstrap, build and deployment, build bootstrap, build system, build, builder, compile, compiler, components, conventions, deploy, example handlebars, framework, generator, gh-pages, grunt task, grunt, gruntplugin, handlebars, helpers, jekyll alternative, jekyll static, jekyll, json, mock, mocking, modules, mustache, node blog, node jekyll, parse, parser, partial, partials, pre-processor, preprocessor, render, renderer, scaffold, scaffolds, site blog generator, site builder, site generator, site generators, site site generator, site site generators, static HTML, static site, templates, templating, theme, themes, tool, toolkit, utility, web development, web framework, yaml front matter, yaml
License
MIT
Install
npm install assemble-markdown-import@0.0.2

Documentation

assemble-markdown-import

An Assemble plugin for importing and parsing of markdown from data sources.

Inspired and borrowed heavily from adjohnson916's assemble-markdown-data plugin.

Usage

First, setup a project with Grunt and Assemble.

Then install the plugin:

npm install --save-dev assemble-markdown-import

Add the plugin to your Grunt assemble config:

assemble: {
  options: {
    plugins: [ 'assemble-markdown-import' ]
  },
  ...
},

For any markdown file you want to be imported and parsed, define it as an object with markdownFile as the key whose value is the full path to the markdown file. After being imported, but before rendering, this object will be replaced by the HTML that results from parsing the markdown.

Example

# profile.yml
name: Julio Barnes
about:
  markdownFile: './text/about_julio_barnes.md'
age: 64

Resulting JavaScript object:

{
  "name": "Julio Barnes",
  "about": "<h2>I am Julio</h2><p>I am...<ul><li>Brave</li><li>Strong</li><li>Noble</li></ul><p>I also like pudding.</p>",
  "age": 64
}

If you're using Jade with Assemble, then output the item with the != operator to output the unescaped HTML. Eg:

div!=profile.markdownFile