This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var helperList = ['a', 'b', 'c', 'd', 'e']; | |
var documentedList = ['a', 'c']; | |
var undocumentedList = []; | |
helperList.forEach(function(helper) { | |
if(_.contains(documentedList, helper) === false) { | |
undocumentedList.push(helper); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"articles": [ | |
{ | |
"title": "Article 1", | |
"#comments": [ | |
{"subject": "sweet article 1", "body": "that's a really sweet first article" }, | |
{"subject": "re: sweet article 1", "body": "I total agree" } | |
] | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
'use strict'; | |
// Project configuration. | |
grunt.initConfig({ | |
// Project metadata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assembleOptions = options #this is assuming these helpers are in the register function that takes in an options object from assemble | |
minimatch = require 'minimatch' | |
matchPartials = (src, search) -> | |
files = grunt.files.expand src | |
partials = files.filter(minimatch.filter(search)) | |
partials |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: {{ include [partial] }} | |
module.exports.include = include = (template, options) -> | |
partial = Handlebars.partials[template] | |
if (typeof partial is "string") | |
partial = Handlebars.compile(partial) | |
Handlebars.partials[template] = partial | |
return Utils.safeString('Partial **' + template + '** not found.') unless partial | |
context = _.extend({}, this, options.hash) | |
Utils.safeString partial(context) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var options = { | |
stage: 'assemble:post:pages' | |
}; | |
var plugin = function(params, next) { | |
var buildPaginationInfo = function() { | |
var pages = params.assemble.options.pages; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('lodash'); | |
module.exports = function(grunt) { | |
var config = grunt.file.readJSON('path/to/blog/config.json'); | |
grunt.initConfig({ | |
config: config, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/node_modules | |
/node_modules/.bin | |
/node_modules/assemble | |
/node_modules/assemble-contrib-anchors | |
/node_modules/assemble-contrib-decompress | |
/node_modules/assemble-contrib-download | |
/node_modules/assemble-contrib-permalinks | |
/node_modules/assemble-less | |
/node_modules/chalk | |
/node_modules/cheerio |