
Security News
curl Shuts Down Bug Bounty Program After Flood of AI Slop Reports
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.
expand-front-matter
Advanced tools
Middleware for processing config templates in front matter. Can be used with verb, assemble v0.6.0 and greater, or any application based on jonschlinkert/templates.
Middleware for processing config templates in front matter. Can be used with verb, assemble v0.6.0 and greater, or any application based on jonschlinkert/templates.
Install with npm:
$ npm install --save expand-front-matter
Works with assemble, verb, generate, update, or any Template-based application. Just replace assemble in the examples with your application of choice.
This requires front-matter to be parsed in advance. You can easily do this with parser-front-matter like this:
var assemble = require('assemble');
var app = assemble();
// parse front matter on all `hbs` files
app.onLoad(/\.hbs$/, function(view, next) {
matter.parse(view, next);
});
Use as a middleware:
var expand = require('expand-front-matter');
var assemble = require('assemble');
var app = assemble();
app.onLoad(/\.hbs$/, expand(app));
app.pages('*.hbs');
app plugin
Use as an "instance" plugin on app to expand templates in the front-matter of all views in all collections:
var expand = require('expand-front-matter');
var assemble = require('assemble');
var app = assemble();
app.use(expand());
app.pages('*.hbs');
Collection plugin
Use as a collection instance plugin to expand templates in the front-matter of all views in the collection:
var expand = require('expand-front-matter');
var assemble = require('assemble');
var app = assemble();
app.create('pages')
.use(expand(app));
app.pages('*.hbs');
view plugin
Use as a view plugin to expand templates in the front-matter of a specific view:
var expand = require('expand-front-matter');
var assemble = require('assemble');
var app = assemble();
app.create('pages')
app.page('foo', {content: '...'})
.use(expand(app))
.render(function(err, res) {
//=> do stuff to res
});
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb-generate-readme, v0.2.0, on December 26, 2016.
FAQs
Middleware for processing config templates in front matter. Can be used with verb, assemble v0.6.0 and greater, or any application based on jonschlinkert/templates.
We found that expand-front-matter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.