As stated in the Getting Started section, all of the The configuration options provided by the jsdoc
configuration are retained. jsdocp
only adds addtional configuration options to the existing jsdoc
configuration opts
.
Configuration Options
jsdocp
offers many addon options in additon to the jsdoc
configuration. A full listing of all the jsdocp
addon configuration options can be found under publicize. All paths defined in the configuration are relative to the module the docs are being generated for.
Default Configuration:
{
"plugins": [
"plugins/markdown"
],
"templates": {
"default": {
"layoutFile": "layout.tmpl",
"staticFiles": {
"include": [
"./node_modules/jsdocp/jsdoc/static"
]
}
}
},
"opts": {
"destination": "./docs",
"template": "./node_modules/jsdocp/jsdoc",
"jsdocp": {
"cleanDestination": true,
"layoutCheckTemplateDirs": [
"tmpl",
"template/tmpl",
"template"
],
"layoutFrags": {
"head": "./node_modules/jsdocp/jsdoc/tmpl/head.tmpl",
"nav": "./node_modules/jsdocp/jsdoc/tmpl/nav.tmpl",
"foot": "./node_modules/jsdocp/jsdoc/tmpl/foot.tmpl"
},
"deploy": {
"message": "Deploy ${package.author.name}/${package.name} to gh-pages",
"path": "./publish",
"branch": "gh-pages",
"host": "github.com",
"user": {
"name": "${package.author.name}",
"email": "${package.author.email}"
}
},
"menu": {
"SM": {
"position": "bottom",
"autoHide": true,
"matchMedia": "(max-width: 480px)"
},
"MD": {
"position": "bottom",
"autoHide": true,
"matchMedia": "(min-width: 481px) and (max-width: 839px)"
},
"LG": {
"position": "top",
"autoHide": false,
"matchMedia": "(min-width: 840px)"
},
"className": "",
"icons": {
"className": ""
},
"logo": {
"title": "",
"src": "",
"inlineSvgPath": "",
"anchorclassName": "",
"className": ""
},
"package": {
"title": "npm",
"src": "",
"className": ""
},
"changelog": {
"title": "Changelog",
"src": "",
"className": ""
},
"sourceCode": {
"title": "Source Code",
"src": "",
"className": ""
},
"versions": {
"title": "v${package.version}",
"src": "",
"className": ""
}
},
"links": [],
"meta": [],
"scripts": [],
"versions": {
"from": "",
"type": "minor"
},
"changelog": {
"title": "CHANGELOG v${package.version}",
"header": "## [${package.version}](${publish.moduleURL}/tree/v${package.version}) (${publish.date})\n[Full Changelog](${publish.moduleURL}/compare/v${publish.lastVersion}...v${package.version})",
"line": "* [%s](${publish.moduleURL}/commit/%H)",
"sections": {
"breaks": {
"grep": {
"regexp": "\\[BREAK\\]",
"ignoreCase": true,
"extendedRegexp": false,
"allMatch": false
},
"header": "__Breaking Changes:__"
},
"features": {
"grep": {
"regexp": "\\[FEATURE\\]",
"ignoreCase": true,
"extendedRegexp": false,
"allMatch": false
},
"header": "__Features:__"
},
"fixes": {
"grep": {
"regexp": "\\[FIX\\]",
"ignoreCase": true,
"extendedRegexp": false,
"allMatch": false
},
"header": "__Fixes:__"
},
"merges": {
"grep": {
"regexp": "\\[MERGE\\]",
"ignoreCase": true,
"extendedRegexp": false,
"allMatch": false
},
"header": "__Merged Pull Requests:__"
}
}
}
}
}
}
Example jsdocp
Configuration (overrides any defaults)
{
"source": {
"include": ["index.js", "cli.js", "README.md"],
"includePattern": ".js$",
"excludePattern": "(node_modules/|docs)"
},
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc"]
},
"templates": {
"cleverLinks": false,
"monospaceLinks": true,
"showInheritedInNav": true,
"default": {
"useLongnameInNav": false,
"includeDate": false,
"staticFiles": {
"include": [
"./jsdocp/static"
]
}
}
},
"opts": {
"template": "./node_modules/minami",
"tutorials": "./jsdocp/tutorial",
"encoding": "utf8",
"private": false,
"recurse": true,
"jsdocp": {
"deploy": {
"user": {
"name": "Travis",
"email": "travis@travis-ci.org"
}
},
"menu": {
"className": "pkg-menu",
"icons": {
"className": "pkg-icons"
},
"logo": {
"title": "${package.name}",
"src": "favicon-32x32.png",
"inlineSvgPath": "./jsdocp/static/logo.svg",
"className": "pkg-logo"
}
},
"links": [
{
"rel": "apple-touch-icon",
"sizes": "180x180",
"href": "apple-touch-icon.png"
},
{
"rel": "icon",
"type": "image/png",
"sizes": "32x32",
"href": "favicon-32x32.png"
},
{
"rel": "icon",
"type": "image/png",
"sizes": "16x16",
"href": "favicon-16x16.png"
},
{
"rel": "manifest",
"href": "site.webmanifest"
},
{
"rel": "mask-icon",
"type": "image/png",
"sizes": "16x16",
"href": "safari-pinned-tab.svg",
"color": "#ffab40"
},
{
"type": "text/css",
"rel": "stylesheet",
"href": "pkg-styles/pkg-style.css"
}
],
"metas": [
{
"name": "msapplication-TileColor",
"content": "#ffab40"
},
{
"name": "theme-color",
"content": "#bdbdbd"
},
{
"name": "viewport",
"content": "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
}
],
"scripts": [
{
"src": "pkg-scripts/pkg-script.js"
}
],
"versions": {
"from": "1.0.0",
"type": ""
}
}
}
}