function buildDocs(){ var mdoc = require('mdoc'); mdoc.run({ inputDir : 'doc', outputDir : 'doc_html', baseTitle : 'mout', indexContentPath : 'README.md', templatePath : '_build/doc_template' }); }
mdoc.run({ // === required settings === // inputDir : 'content', outputDir : '../../www-resources/building-the-web', // === basic settings === // baseTitle : 'Building the Web', indexContentPath : 'index.mdown', // === advanced settings === // templatePath : 'custom_template', //by default it will look at an `assets_` folder inside the `templatePath` assetsPath : 'custom_assets', //indexContent will take precedence over `indexContentPath` //indexContent : '<h1>Custom Template</h1><p>Example of a custom template and advanced settings.</p>', /*mapOutName : function(outputName) { //change file output name return outputName.replace('.html', '_doc.html'); },*/ /*mapTocName : function(fileName, tocObject){ //change the name displayed on the sidebar and on the index TOC return fileName.replace('.html', ''); },*/ // pattern that matches files that should be parsed // this is the default value... include : '*.mdown,*.md,*.markdown', // pattern that matches files that shouldn't be parsed //exclude : 'array.*', /*filterFiles : function(fileInfo) { // return `false` to remove files and `true` to keep them return (/math/).test(fileInfo.input); },*/ // sets which heading should be treated as a section start (and is used for // TOC) defaults to `2` headingLevel : 2 });
this.files.forEach(function(file) { opts.inputDir = file.src[0]; opts.outputDir = file.dest; mdoc.run(opts); });
// // This file contains all available settings. // var mdoc = require('mdoc'); mdoc.run({ // === required settings === // inputDir : '.', outputDir : './', // === advanced settings === // templatePath : __dirname + '/custom_template', indexContent: '<h1>Backbone.Marionette Documentation.</h1><p>Please use the links in the sidebar or below to find what you are looking for.</p>', //by default it will look at an `assets_` folder inside the `templatePath` assetsPath : __dirname + '/custom_assets', mapTocName: function (fileName, tocObject) { var name = fileName.replace('marionette.', '').replace('.html', '').replace('view', 'View').replace('manager', 'Manager'); return name.charAt(0).toUpperCase() + name.substring(1); } });
var mdoc = require('mdoc'); mdoc.run({ // === required settings === // inputDir : 'content', outputDir : 'doc', // === optional settings === // baseTitle : 'mdoc example', indexContentPath : 'index.mdown' });
var mdoc = require('mdoc'); mdoc.run({ // === required settings === // inputDir : 'api', outputDir : 'doc', // === optional settings === // indexContentPath : 'index.mdown', assetsPath : 'custom_assets', baseTitle : 'nodejs API', headingLevel : 3 // sets which heading should be treated as a section start (and is used for TOC) defaults to `2` });