API
This page will go over using DocPad as a module, and the API available to you.
Technical API
Install DocPad
Create your DocPad Instance
var docpadInstanceConfiguration = {};
require('docpad').createInstance(docpadInstanceConfiguration, function(err,docpadInstance){
if (err) return console.log(err.stack);
// ...
});Rendering individual files
Render some text with DocPad
Render a file path with DocPad
DocPad CLI Actions
Performing a generation
Start the DocPad server
Generate and Start the DocPad Server
Perform an initial generation, then watch files and regenerate when a change occurs
Using the Database
Get the database
Create a Document and File
Create a Document and File, then add it to the Database
Parse a Document and File Directory
Querying
Using with Express
Last updated
Was this helpful?