spike-front-matter
Jekyll like yaml based front matter for Spike.
Last updated 4 years ago by redhatter .
GPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install spike-front-matter 
SYNC missed versions from official npm registry.

Spike Front Matter

npm version Dependency Status js-standard-style

Jekyll like yaml based front matter for Spike.

Installation

  • cd into your projects root

  • Run npm i spike-front-matter -S

  • modify your app.js file to include the plugin, as such

    const FrontMatter = require('spike-front-matter')
    let fm = new FrontMatter()
    
    module.exports = {
      posthtml: (ctx) => {
        return {
          defaults: [
            jade({ filename: ctx.resourcePath, page: fm.page, site: fm.site}),
          ]
        }
      },
      plugins: [
        fm
      ]
    }
    

Usage

The Spike Front Matter plugin provides you with two properties on the plugin object: page, and site. The page property is an object containing the front matter for the currently compiling file. The site property on the other hand contains all the font matter objects nested within their respective folders.

Current Tags

  • 0.0.3                                ...           latest (4 years ago)

3 Versions

  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |