Grunt plugin for building docs from a variety of file types using DocPad.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 32 commits behind shama:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


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:



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: After the file is converted it will be named: myfile.html.


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


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

grunt.helper('docpad', '', {}, function(out) {
  // out = {'': '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.


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


Copyright (c) 2012 Kyle Robinson Young

Licensed under the MIT license.