Skip to content
This repository has been archived by the owner. It is now read-only.
A plugin for static-engine.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
index.js
package.json
test.js

README.md

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)
])
You can’t perform that action at this time.