siteConfig
- typedef
{Object}
The configuration options within a docConfig's sites
objects or sitesDefaults
object.
Object
Properties
-
glob
="**/*.{js,md}"
{String | GlobObject}
OptionalConfigures the files that will be processed into documentation. The glob option either specifies a minmatch pattern like:
{glob: "*.js"}
Or a GlobObject that specifies the a minmatch pattern and other options like:
{ glob: { pattern: "*.js", cwd: __dirname, ignore: "{some_folder}/**/*" } }
By default the pattern
"**/*.{js,md}"
is used, which searches for all.js
and.md
files within the project. And the default ignore is"{node_modules,bower_components}/**/*"
which ignores everything in the node_modules and bower_components folder. -
dest
{String}
OptionalThe location of the folder where DocumentJS should write the output. Locations should be relative to the parent folder of the documentjs.json file. If this is not provided, the site name of the configuration is used.
-
parent
{String}
OptionalThe name of the docObject that will be shown at
index.html
. If one is not provided, one will be attempted to be found by:- Trying to find the docObject that is parent of every other docObject.
- Trying to find the docObject that has the most children.
If that fails, an "index" docObject might be created and set as the parent of every other docObject that does not have a parent.
-
pageConfig
{Object}
OptionalAn object that is made availalbe to the generated HTML pages.
-
static
{String}
The location of static content used to overwrite or add to the default static content.
-
forceBuild
=false
{Boolean}
OptionalIf set to
true
, rebuilds the static bundle even if it has already been built. -
minifyBuild
=true
{Boolean}
OptionalIf set to
false
the build will not be minified. This behavior should be implemented by the "build" module. -
devBuild
=false
{Boolean}
OptionalIf set to
true
the build will not be built so that individual files will be loaded. This behavior should be implemented by the "build" module. -
templates
{String}
OptionalThe location of templates used to overwrite or add to the default templates.
-
tags
{String}
OptionalA path to a module that determines which tags will be used to process the site. The module must export a function that takes the default tags object and returns the tags that will be used.
Example use:
tags: "./theme/tags"
Example module:
// theme/tags.js module.exports = function(defaultTags) { tags = _.extend({},defaultTags); tags.customTag = {add: function(){}, ...} return tags; };
-
generators
{moduleName | Array<moduleName>}
OptionalGenerators specifies a generator module or array of modules used to create an output for documentation. The default generator is "html" which maps to documentjs's internal html generator.
You can specify other modules which will be passed a promise containing the docMap and the
options
and be expected to return a promise that resolves when they are complete. -
singlePage
=false
{Boolean}
Optional
Use
A
siteConfig
object configures a single call to generate. It specifies files to be converted to documentation and configures how the output should be generated. It looks like:A
siteConfig
object is within a docConfig'ssites
orsiteDefaults
objects like: