Skip to content

A clean, responsive documentation template with search and navigation highlighting for JSDoc 3.

License

Notifications You must be signed in to change notification settings

googleapis/jsdoc-fresh

Folders and files

NameName
Last commit message
Last commit date
Oct 21, 2024
Nov 13, 2023
May 20, 2020
Jun 3, 2021
Oct 6, 2023
May 20, 2020
Jul 30, 2020
Aug 10, 2023
Nov 21, 2019
Sep 12, 2020
May 20, 2020
May 20, 2020
May 20, 2020
May 21, 2021
Jun 11, 2021
Aug 10, 2023
Oct 27, 2020
Dec 22, 2020
Nov 21, 2019
Oct 30, 2020
Apr 29, 2021
Nov 21, 2019
Oct 21, 2024
Aug 10, 2023
Jun 26, 2024
Jun 26, 2024

Fresh JSDoc Template

NPM Version Build Status semantic-release

A clean, responsive documentation template with search and navigation highlighting for JSDoc 3. Forked from github.com/braintree/jsdoc-template.

Braintree JS Doc Template Screenshot

Responsive

Braintree JS Doc Template Screenshot

Uses

Usage

Clone repository to your designated jsdoc template directory, then:

Node.js Dependency

In your projects package.json file add a generate script:

"script": {
  "generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose"
}

In your .jsdoc.json file, add a template option.

"opts": {
  "template": "node_modules/jsdoc-fresh"
}

Example JSDoc Config

{
    "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, you can pass a search object into the templates object.

"templates": {
    "search": {
        "apiKey": "your-api-key",
        "indexName": "Your index name. Defaults to braintree.",
        "hitsPerPage": "Number of Results to show. Defaults to 7.",
    }
}

License

Licensed under the Apache2 license.