Compiles a tree of Github-flavored markdown files into themable HTML templates. Supports pulling directly from multiple remote or local git repositories and exposes lifecycle hooks for transforming markdown input (beforeConvert) or HTML output (afterConvert). Also writes flat tree arrays representing the directory hierarchy as JSON files.
$ npm install doc-templater
// dumb dumb test script
require('doc-templater')().build({
remote: '[email protected]:balderdashy/sails.git',
remoteSubPath: '',
cachePath: '/code/sandbox/doctemplatertest/foo/bar/cache/',
htmlDirPath: '/code/sandbox/doctemplatertest/foo/bar/html',
jsMenuPath: '/code/sandbox/doctemplatertest/foo/bar.jsmenu'
}, function (e,r) {
if (e) {console.log('ERROR:\n',require('util').inspect(e, false, null));}
else console.log('RESULT:\n',require('util').inspect(r, false, null));
});
MIT © 2013-2014 Nicholas Crumrine, Mike McNeil & contributors
This module is part of the Node.js and Sails framework ecosystem, and is free and open-source under the MIT License.