|
| 1 | +# Docdash |
| 2 | +[](https://travis-ci.org/clenemt/docdash) [](https://badge.fury.io/js/docdash) [](LICENSE.md) |
| 3 | + |
| 4 | +A clean, responsive documentation template theme for JSDoc 3. |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | +## Example |
| 11 | +See http://clenemt.github.io/docdash/ for a sample demo. :rocket: |
| 12 | + |
| 13 | +## Install |
| 14 | + |
| 15 | +```bash |
| 16 | +$ npm install docdash |
| 17 | +``` |
| 18 | + |
| 19 | +## Usage |
| 20 | +Clone repository to your designated `jsdoc` template directory, then: |
| 21 | + |
| 22 | +```bash |
| 23 | +$ jsdoc entry-file.js -t path/to/docdash |
| 24 | +``` |
| 25 | + |
| 26 | +## Usage (npm) |
| 27 | +In your projects `package.json` file add a new script: |
| 28 | + |
| 29 | +```json |
| 30 | +"script": { |
| 31 | + "generate-docs": "node_modules/.bin/jsdoc -c jsdoc.json" |
| 32 | +} |
| 33 | +``` |
| 34 | + |
| 35 | +In your `jsdoc.json` file, add a template option. |
| 36 | + |
| 37 | +```json |
| 38 | +"opts": { |
| 39 | + "template": "node_modules/docdash" |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +## Sample `jsdoc.json` |
| 44 | +See the config file for the [fixtures](fixtures/fixtures.conf.json) or the sample below. |
| 45 | + |
| 46 | +```json |
| 47 | +{ |
| 48 | + "tags": { |
| 49 | + "allowUnknownTags": false |
| 50 | + }, |
| 51 | + "source": { |
| 52 | + "include": "../js", |
| 53 | + "includePattern": "\\.js$", |
| 54 | + "excludePattern": "(node_modules/|docs)" |
| 55 | + }, |
| 56 | + "plugins": [ |
| 57 | + "plugins/markdown" |
| 58 | + ], |
| 59 | + "opts": { |
| 60 | + "template": "assets/template/docdash/", |
| 61 | + "encoding": "utf8", |
| 62 | + "destination": "docs/", |
| 63 | + "recurse": true, |
| 64 | + "verbose": true |
| 65 | + }, |
| 66 | + "templates": { |
| 67 | + "cleverLinks": false, |
| 68 | + "monospaceLinks": false |
| 69 | + } |
| 70 | +} |
| 71 | +``` |
| 72 | + |
| 73 | +## Options |
| 74 | +Docdash supports the following options: |
| 75 | + |
| 76 | +```json5 |
| 77 | +{ |
| 78 | + "docdash": { |
| 79 | + "static": [false|true], // Display the static members inside the navbar |
| 80 | + "sort": [false|true], // Sort the methods in the navbar |
| 81 | + "sectionOrder": [ // Order the main section in the navbar (default order shown here) |
| 82 | + "Classes", |
| 83 | + "Modules", |
| 84 | + "Externals", |
| 85 | + "Events", |
| 86 | + "Namespaces", |
| 87 | + "Mixins", |
| 88 | + "Tutorials", |
| 89 | + "Interfaces" |
| 90 | + ], |
| 91 | + "disqus": "", // Shortname for your disqus (subdomain during site creation) |
| 92 | + "openGraph": { // Open Graph options (mostly for Facebook and other sites to easily extract meta information) |
| 93 | + "title": "", // Title of the website |
| 94 | + "type": "website", // Type of the website |
| 95 | + "image": "", // Main image/logo |
| 96 | + "site_name": "", // Site name |
| 97 | + "url": "" // Main canonical URL for the main page of the site |
| 98 | + }, |
| 99 | + "meta": { // Meta information options (mostly for search engines that have not indexed your site yet) |
| 100 | + "title": "", // Also will be used as postfix to actualy page title, prefixed with object/document name |
| 101 | + "description": "", // Description of overal contents of your website |
| 102 | + "keyword": "" // Keywords for search engines |
| 103 | + }, |
| 104 | + "search": [false|true], // Display seach box above navigation which allows to search/filter navigation items |
| 105 | + "collapse": [false|true], // Collapse navigation by default except current object's navigation of the current page |
| 106 | + "wrap": [false|true], // Wrap long navigation names instead of trimming them |
| 107 | + "typedefs": [false|true], // Include typedefs in menu |
| 108 | + "navLevel": [integer], // depth level to show in navbar, starting at 0 (false or -1 to disable) |
| 109 | + "private": [false|true], // set to false to not show @private in navbar |
| 110 | + "removeQuotes": [none|all|trim],// Remove single and double quotes, trim removes only surrounding ones |
| 111 | + "scripts": [], // Array of external (or relative local copied using templates.default.staticFiles.include) js or css files to inject into HTML, |
| 112 | + "menu": { // Adding additional menu items after Home |
| 113 | + "Project Website": { // Menu item name |
| 114 | + "href":"https://myproject.com", //the rest of HTML properties to add to manu item |
| 115 | + "target":"_blank", |
| 116 | + "class":"menu-item", |
| 117 | + "id":"website_link" |
| 118 | + }, |
| 119 | + "Forum": { |
| 120 | + "href":"https://myproject.com.forum", |
| 121 | + "target":"_blank", |
| 122 | + "class":"menu-item", |
| 123 | + "id":"forum_link" |
| 124 | + } |
| 125 | + }, |
| 126 | + scopeInOutputPath: [false|true], // Add scope from package file (if present) to the output path, true by default. |
| 127 | + nameInOutputPath: [false|true], // Add name from package file to the output path, true by default. |
| 128 | + versionInOutputPath: [false|true] // Add package version to the output path, true by default. |
| 129 | + } |
| 130 | +} |
| 131 | +``` |
| 132 | + |
| 133 | +Place them anywhere inside your `jsdoc.json` file. |
| 134 | + |
| 135 | +## Contributors |
| 136 | + |
| 137 | +[](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/0) |
| 138 | +[](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/1) |
| 139 | +[](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/2) |
| 140 | +[](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/3) |
| 141 | +[](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/4) |
| 142 | +[](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/5) |
| 143 | +[](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/6) |
| 144 | +[](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/7) |
| 145 | + |
| 146 | +## Thanks |
| 147 | +Thanks to [lodash](https://lodash.com) and [minami](https://github.com/nijikokun/minami). |
| 148 | + |
| 149 | +## License |
| 150 | +Licensed under the Apache License, version 2.0. (see [Apache-2.0](LICENSE.md)). |
0 commit comments