Generates a JSON file with the context of each page. Basic plugin to help see what's happening in the build.
In the command line, run:
npm install grunt-assemble-contextual --save
Next, to register the plugin with Assemble in your project's Gruntfile you can either specify the direct path to the plugin(s) (e.g. ./path/to/plugins/*.js
), or if installed via npm, make sure the plugin is in the devDependencies
of your project.js package.json, and simply add the module's name to the plugins
option:
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
assemble: {
options: {
plugins: ['grunt-assemble-contextual', 'other/plugins/*.js'],
contextual: {
dest: 'tmp/'
}
},
files: {
'dist/': ['templates/*.hbs']
}
}
});
grunt.loadNpmTasks('assemble');
grunt.registerTask('default', ['assemble']);
};
If everything was installed and configured correctly, after running grunt assemble
you should see a JSON file for each page in the dest
directory defined in the plugin's options. The basename of each page will be used as the name of each file.
This plugin will make the build run slower! To disable it simple remove it from the options or remove the dest
property.
Visit the plugins docs for more info or for help getting started.
Type: String
Default: assemble.dest + /tmp
Destination of JSON context.
- grunt-assemble: Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… more | homepage
- grunt-assemble-anchors: Assemble plugin for creating anchor tags from headings in generated html using Cheerio.js. | homepage
- grunt-assemble-decompress: Assemble plugin for extracting zip, tar and tar.gz archives. | homepage
- grunt-assemble-download: Assemble plugin for downloading files from GitHub. | homepage
- grunt-assemble-i18n: Plugin for adding i18n support to Assemble projects. | homepage
- grunt-assemble-lunr: Assemble plugin for adding search capabilities to your static site, with lunr.js. | homepage
- grunt-assemble-navigation: Assemble navigation plugin. Automatically generate Bootstrap-style, multi-level side nav. See the sidenav on assemble.io for… more | homepage
- grunt-assemble-permalinks: Permalinks plugin for Assemble, the static site generator for Grunt.js, Yeoman and Node.js. This plugin… more | homepage
- grunt-assemble-sitemap: Sitemap plugin for Assemble | homepage
- grunt-assemble-toc: Assemble middleware for adding a Table of Contents (TOC) to any HTML page. | homepage
- grunt-assemble-wordcount: Assemble plugin for displaying wordcount and average reading time to blog posts or pages. | homepage
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on September 25, 2015.