jsdoc-fresh
Version:
Fresh JSDoc 3 Template
95 lines (72 loc) • 2.63 kB
Markdown
[](https://npmjs.org/package/jsdoc-fresh)
[](https://cirrus-ci.com/github/JustinBeckwith/jsdoc-fresh)
[](https://github.com/semantic-release/semantic-release)
> A clean, responsive documentation template with search and navigation highlighting for JSDoc 3. Forked from [github.com/braintree/jsdoc-template](https://github.com/braintree/jsdoc-template).


- [the Taffy Database library](http://taffydb.com/)
- [Underscore Template library](http://documentcloud.github.com/underscore/#template)
- [Algolia DocSearch](https://community.algolia.com/docsearch/)
Clone repository to your designated `jsdoc` template directory, then:
In your projects `package.json` file add a generate script:
```json
"script": {
"generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose"
}
```
In your `.jsdoc.json` file, add a template option.
```json
"opts": {
"template": "node_modules/jsdoc-fresh"
}
```
```json
{
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc"]
},
"source": {
"include": ["lib", "package.json", "README.md"],
"includePattern": ".js$",
"excludePattern": "(node_modules/|docs)"
},
"plugins": [
"plugins/markdown"
],
"templates": {
"referenceTitle": "My SDK Name",
"disableSort": false,
"collapse": true,
"resources": {
"google": "https://www.google.com/"
}
},
"opts": {
"destination": "./docs/",
"encoding": "utf8",
"private": true,
"recurse": true,
"template": "./node_modules/jsdoc-template"
}
}
```
Note: `referenceTitle` and `disableSort` will affect the output of this theme.
If you would like to enable [Algolia DocSearch](https://community.algolia.com/docsearch/), you can pass a `search` object into the `templates` object.
```json
"templates": {
"search": {
"apiKey": "your-api-key",
"indexName": "Your index name. Defaults to braintree.",
"hitsPerPage": "Number of Results to show. Defaults to 7.",
}
}
```
Licensed under the Apache2 license.