Skip to content
Grunt plugin for building docs from a variety of file types using DocPad.
Find file
Pull request Compare This branch is 27 commits behind shama:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin
tasks
test
.gitignore
.npmignore
LICENSE-MIT
README.md
grunt.js
package.json

README.md

grunt-docs

A grunt plugin to build docs from a variety of file types using DocPad.

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-docs

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-docs');

Documentation

This plugin provides the task: docs. Here is an example config block:

docs: {
  www: {
    src: ['docs/api/**/*'],
    dest: 'out/'
  }
}

This will compile all the files within the docs/api/ folder and sub folders. Then output the files to the out/ folder, duplicating the same path structure.

The conversion of your files is based on its extension. For example if I wanted a file in markdown to be converted to html, I would name the file: myfile.html.md. After the file is converted it will be named: myfile.html.

DocPad

grunt-docs supports all the render types DocPad supports. Depending on the types you want to convert, you will need to install the additional dependencies.

For example if you would like to convert css/style.css.styl you would need to install the docpad-plugin-stylus module.

Included Helpers

docpad

Use the docpad helper in your grunt module to convert files with DocPad.

grunt.helper('docpad', 'myfile.html.md', {}, function(out) {
  // out = {'myfile.html.md': 'The compiled HTML of the file'};
});

You can pass an array of files instead of a single file path to convert multiple files. The second argument is an object literal for DocPad configurations.

Contributing

Please use the issue tracker and pull requests.

Release History

  • 0.2.0 Convert to use DocPad
  • 0.1.1 More testable structure of module
  • 0.1.0 Initial release

License

Copyright (c) 2012 Kyle Robinson Young

Licensed under the MIT license.

Something went wrong with that request. Please try again.