Skip to content
This repository was archived by the owner on Jan 29, 2019. It is now read-only.

erickmerchant/static-engine-frontmatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

static-engine-frontmatter

Dependency Status devDependency Status js-standard-style

This is a plugin for static-engine. Traverses every object in the array and extracts frontmatter from the content property. Call it with a converter for the frontmatter, something like JSON.parse, and then optionially a delimiter. By default the delimiter is ---; The properties of the frontmatter are assigned to the object, and the frontmatter along with the delims is removed from the content.

var engine = require('static-engine')
var frontmatter = require('static-engine-frontmatter')
var pluginA = require('plugin-a')
var cson = require('cson-parser')

engine([
  pluginA,
  frontmatter(cson.parse)
])

About

A plugin for static-engine.

Resources

License

Stars

Watchers

Forks

Packages

No packages published