clean-jsdoc-theme 3.2.8 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +4 -4
- package/.eslintrc.js +3 -3
- package/.github/ISSUE_TEMPLATE/bug_report.md +43 -43
- package/.github/ISSUE_TEMPLATE/feature_request.md +27 -27
- package/.github/pull_request_template.md +16 -16
- package/.github/workflows/codeql-analysis.yml +67 -67
- package/.prettierignore +2 -2
- package/.prettierrc +5 -5
- package/.stylelintignore +3 -3
- package/.stylelintrc +23 -23
- package/.travis.yml +30 -30
- package/CHANGELOG.md +210 -191
- package/CODE_OF_CONDUCT.md +76 -76
- package/CODE_OF_CONDUCT_HINDI.md +46 -46
- package/CONTRIBUTING.md +24 -24
- package/LICENSE +21 -21
- package/README.md +535 -500
- package/SECURITY.md +21 -21
- package/helpers/down-arrow.js +9 -9
- package/jsdoc-config.json +60 -59
- package/package.json +46 -46
- package/publish.js +1195 -941
- package/static/fonts/Montserrat-Regular.ttf +0 -0
- package/static/fonts/OFL-hind.txt +0 -0
- package/static/fonts/OFL-montserrat.txt +0 -0
- package/static/scripts/fix-code-block.js +53 -53
- package/static/scripts/fix-navbar.js +25 -25
- package/static/scripts/linenumber.js +25 -25
- package/static/scripts/misc.js +217 -210
- package/static/scripts/resize.js +85 -85
- package/static/scripts/search.js +83 -83
- package/static/scripts/third-party/Apache-License-2.0.txt +202 -202
- package/static/scripts/third-party/fuse.js +8 -8
- package/static/scripts/third-party/lang-css.js +2 -2
- package/static/scripts/third-party/prettify.js +28 -28
- package/static/styles/clean-jsdoc-theme-base.css +393 -393
- package/static/styles/clean-jsdoc-theme-dark.css +324 -324
- package/static/styles/clean-jsdoc-theme-light.css +319 -319
- package/static/styles/reset.css +351 -346
- package/static/styles/third-party/ionicons.min.css +11 -11
- package/static/styles/third-party/prettify-jsdoc.css +111 -111
- package/static/styles/third-party/prettify-tomorrow.css +5 -5
- package/tmpl/augments.tmpl +10 -10
- package/tmpl/container.tmpl +189 -189
- package/tmpl/details.tmpl +208 -209
- package/tmpl/example.tmpl +3 -3
- package/tmpl/examples.tmpl +38 -38
- package/tmpl/exceptions.tmpl +32 -32
- package/tmpl/icons.tmpl +34 -34
- package/tmpl/layout.tmpl +171 -167
- package/tmpl/mainpage.tmpl +10 -10
- package/tmpl/members.tmpl +43 -43
- package/tmpl/method.tmpl +140 -140
- package/tmpl/params.tmpl +124 -124
- package/tmpl/properties.tmpl +109 -109
- package/tmpl/returns.tmpl +18 -18
- package/tmpl/source.tmpl +7 -7
- package/tmpl/tutorial.tmpl +19 -19
- package/tmpl/type.tmpl +6 -6
package/README.md
CHANGED
|
@@ -1,500 +1,535 @@
|
|
|
1
|
-
<hr>
|
|
2
|
-
<h1 align="center">clean-jsdoc-theme</h1>
|
|
3
|
-
<p align=center><i align="center">A beautiful, responsive, customizable theme for JSDoc</i></p>
|
|
4
|
-
<hr>
|
|
5
|
-
|
|
6
|
-
[](https://github.com/ankitskvmdam/clean-jsdoc-theme) [](https://github.com/ankitskvmdam/clean-jsdoc-theme/fork) .
|
|
10
|
-
|
|
11
|
-
For any suggestions, questions or bugs, feel free to create an <a href="https://github.com/ankitskvmdam/clean-jsdoc-theme/issues">issue</a> in this repo.
|
|
12
|
-
|
|
13
|
-
## Demo
|
|
14
|
-
|
|
15
|
-
Live demo (dark): <a href="https://ankdev.me/clean-jsdoc-theme/dark/index.html">https://ankdev.me/clean-jsdoc-theme/dark/index.html</a> <br>
|
|
16
|
-
Live demo (light): <a href="https://ankdev.me/clean-jsdoc-theme/light/index.html">https://ankdev.me/clean-jsdoc-theme/light/index.html</a>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
](https://github.com/ankitskvmdam/clean-jsdoc-theme) [](https://github.com/ankitskvmdam/clean-jsdoc-theme/fork)  [](https://github.com/ankitskvmdam/clean-jsdoc-theme/issues) [](https://github.com/ankitskvmdam/clean-jsdoc-theme/graphs/contributors) [](https://travis-ci.org/ankitskvmdam/clean-jsdoc-theme) [](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/LICENSE)
|
|
7
|
+
<br>
|
|
8
|
+
|
|
9
|
+
Clean-jsdoc-theme is a beautifully crafted theme/template for JSDoc 3. This theme/template looks and feels like a premium theme/template as it's mobile responsive and also highly customizable. For more options [look below at the options section](#options).
|
|
10
|
+
|
|
11
|
+
For any suggestions, questions or bugs, feel free to create an <a href="https://github.com/ankitskvmdam/clean-jsdoc-theme/issues">issue</a> in this repo.
|
|
12
|
+
|
|
13
|
+
## Demo
|
|
14
|
+
|
|
15
|
+
1. Live demo (dark): <a href="https://ankdev.me/clean-jsdoc-theme/dark/index.html">https://ankdev.me/clean-jsdoc-theme/dark/index.html</a> <br>
|
|
16
|
+
1. Live demo (light): <a href="https://ankdev.me/clean-jsdoc-theme/light/index.html">https://ankdev.me/clean-jsdoc-theme/light/index.html</a>
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
1. [https://github.com/ankitskvmdam/clean-jsdoc-theme-example](https://github.com/ankitskvmdam/clean-jsdoc-theme-example) - This repo will give an overview of how to setup clean-jsdoc-theme.
|
|
21
|
+
|
|
22
|
+
#### Screenshot
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+

|
|
26
|
+

|
|
27
|
+

|
|
28
|
+

|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
## Libraries Used
|
|
32
|
+
|
|
33
|
+
1. [Fuse.js](https://fusejs.io/) - Fuse.js is a powerful, lightweight fuzzy-search library, with zero dependencies.
|
|
34
|
+
1. [Overlay Scrollbars](https://kingsora.github.io/OverlayScrollbars/#!overview) - A javascript scrollbar plugin which hides native scrollbars, provides
|
|
35
|
+
custom styleable overlay scrollbars and keeps the native functionality and feeling of native scrollbars.
|
|
36
|
+
|
|
37
|
+
## Motivation
|
|
38
|
+
|
|
39
|
+
When I was new to JavaScript documentation and [JSDoc](https://jsdoc.app/), it was hard for me to find a theme for JSDoc which was highly customizable or regularly maintained. Features that these lacked included responsiveness, a working search bar, and customization.
|
|
40
|
+
To tackle these problems I created this project, an easy to use, responsive theme for JSDoc. I am actively working on this project and I try to make changes to the project frequently to make sure it's up to date, and suggestions and bugs are fixed.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
> Note you must have `npm` installed on your machine.
|
|
45
|
+
|
|
46
|
+
On your command line type
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm install clean-jsdoc-theme
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
Clone repository to your designated JSDoc template directory, then run the following command:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
jsdoc entry-file.js -t path/to/clean-jsdoc-theme
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Node.js Dependency
|
|
61
|
+
|
|
62
|
+
In your projects `package.json` file add a generate script
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
"script": {
|
|
66
|
+
"generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose"
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
In your `jsdoc.json` file, add a template option.
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
"opts": {
|
|
74
|
+
"template": "node_modules/clean-jsdoc-theme"
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Example JSDoc Config
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"source": {
|
|
83
|
+
"include": ["lib", "package.json", "README.md"],
|
|
84
|
+
"includePattern": ".js$",
|
|
85
|
+
"excludePattern": "(node_modules/|docs)"
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
"plugins": ["plugins/markdown"],
|
|
89
|
+
|
|
90
|
+
"opts": {
|
|
91
|
+
"encoding": "utf8",
|
|
92
|
+
"readme": "./README.md",
|
|
93
|
+
"destination": "docs/",
|
|
94
|
+
"recurse": true,
|
|
95
|
+
"verbose": true,
|
|
96
|
+
"template": "./node_modules/clean-jsdoc-theme",
|
|
97
|
+
"theme_opts": {
|
|
98
|
+
"theme": "dark"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Options
|
|
105
|
+
|
|
106
|
+
To use custom options (such as light and dark modes), pass an object called `theme_opts` in your config file under `opts`.
|
|
107
|
+
|
|
108
|
+
### `theme : "light" | "dark"`
|
|
109
|
+
|
|
110
|
+
To set the overall theme of the documentation file(s). Currently there is only two variant `"light"` and `"dark"` but in future I will try to add more.
|
|
111
|
+
`Default value is "light"`
|
|
112
|
+
|
|
113
|
+
### `favicon: string`
|
|
114
|
+
|
|
115
|
+
This option sets the favicon of the document. It accepts strings defining the path of the icon.
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
"favion": "path/to/img"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
You can use `static_dir` to copy all you static files to output dir and use that path in place of `path/to/img`. For more details look `static_dir` section.
|
|
122
|
+
|
|
123
|
+
### `title: string | HTML`
|
|
124
|
+
|
|
125
|
+
This option sets the title of the document in the navbar. Both strings and HTML are accepted; use HTML to overwrite the default HTML, and a string to set a plaintext title. One example of this is below:
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
"title": "<img src='path/to/img' class='my-custom-class'/>"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
You can use `static_dir` to copy all you static files to output dir and use that path in place of `path/to/img`. For more details look `static_dir` section.
|
|
132
|
+
|
|
133
|
+
### `menu: Array<{}>`
|
|
134
|
+
|
|
135
|
+
This options allows rendering of extra link(s) in navbar to the side of the documentation. It accepts an array of objects, such as in the following example example:
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
"menu" : [
|
|
139
|
+
{
|
|
140
|
+
"title": "Website",
|
|
141
|
+
"link": "https://ankdev.me/clean-jsdoc-theme/dark/",
|
|
142
|
+
"target": "_blank",
|
|
143
|
+
"class": "some-class",
|
|
144
|
+
"id": "some-id"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
#### Required properties
|
|
150
|
+
|
|
151
|
+
| name | type |
|
|
152
|
+
| ------- | -------- |
|
|
153
|
+
| `title` | `string` |
|
|
154
|
+
| `link` | `string` |
|
|
155
|
+
|
|
156
|
+
#### Optional Properties
|
|
157
|
+
|
|
158
|
+
| name | type |
|
|
159
|
+
| -------- | -------- |
|
|
160
|
+
| `target` | `string` |
|
|
161
|
+
| `class` | `string` |
|
|
162
|
+
| `id` | `string` |
|
|
163
|
+
|
|
164
|
+
### `sections: Array<SECTION_TYPE>`
|
|
165
|
+
|
|
166
|
+
This can be used to order the navbar sections. This can also be used to hide/remove any section.
|
|
167
|
+
|
|
168
|
+
```js
|
|
169
|
+
// SECTION_TYPE
|
|
170
|
+
[
|
|
171
|
+
'Classes',
|
|
172
|
+
'Modules',
|
|
173
|
+
'Externals',
|
|
174
|
+
'Events',
|
|
175
|
+
'Namespaces',
|
|
176
|
+
'Mixins',
|
|
177
|
+
'Tutorials',
|
|
178
|
+
'Interfaces',
|
|
179
|
+
'Global',
|
|
180
|
+
'Menu',
|
|
181
|
+
];
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
```json5
|
|
185
|
+
"sections": ["Classes", "Modules", "Global", "Menu"] // Only 4 members will be in the navbar.
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### `meta: Array<{}>`
|
|
189
|
+
|
|
190
|
+
A list of `meta` tag attributes to add to the `head` of each page.
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
"meta" : [
|
|
194
|
+
{
|
|
195
|
+
"name": "author",
|
|
196
|
+
"content": "Ankit Kumar"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "description",
|
|
200
|
+
"content": "Best Clean and minimal JSDoc 3 Template/Theme"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
#### Properties
|
|
206
|
+
|
|
207
|
+
Any valid combination of [HTML metadata attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#Attributes).
|
|
208
|
+
|
|
209
|
+
### `search: {}`
|
|
210
|
+
|
|
211
|
+
To render search. Default value:
|
|
212
|
+
|
|
213
|
+
```json
|
|
214
|
+
"search": {
|
|
215
|
+
"shouldSort": true,
|
|
216
|
+
"threshold": 0.4,
|
|
217
|
+
"location": 0,
|
|
218
|
+
"distance": 100,
|
|
219
|
+
"maxPatternLength": 32,
|
|
220
|
+
"minMatchCharLength": 1,
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
If you don't want to render search box then do the following:
|
|
225
|
+
|
|
226
|
+
```json
|
|
227
|
+
"search" false
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
#### Properties
|
|
231
|
+
|
|
232
|
+
Any valid [fuse.js properties](https://fusejs.io/api/options.html)
|
|
233
|
+
|
|
234
|
+
### `overlay_scrollbar: {}`
|
|
235
|
+
|
|
236
|
+
Includes the OverlayScrollbars plugin. Simply passing an empty object will activate this feature.
|
|
237
|
+
|
|
238
|
+
```json
|
|
239
|
+
"overlay_scrollbar": {
|
|
240
|
+
"option": {}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
#### Properties
|
|
245
|
+
|
|
246
|
+
Any valid [overlay scrollbar properties](https://kingsora.github.io/OverlayScrollbars/#!documentation/options)
|
|
247
|
+
|
|
248
|
+
### `resizeable: {}`
|
|
249
|
+
|
|
250
|
+
This will make certain element in DOM resizeable. Currently we only support navbar to be resizeable. By default navbar is not resizeable. To make navbar resizeable you have to do the following:
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
"resizeable": {
|
|
254
|
+
"navbar": {
|
|
255
|
+
"min": "300",
|
|
256
|
+
"max": "600"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Don't include any unit. Also, units of max and min is inferred in `px`.
|
|
262
|
+
|
|
263
|
+
> Note: Navbar is not resizeable on mobile/small screens.
|
|
264
|
+
> If you don't want to give min and max value and want to use the default values then pass empty object.
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
"resizeable": {
|
|
268
|
+
"navbar": {}
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
If you didn't pass any thing in navbar then navbar is not resizeable.
|
|
273
|
+
|
|
274
|
+
### `codepen: {}`
|
|
275
|
+
|
|
276
|
+
This will add a link to the codepen with prefilled data.
|
|
277
|
+
|
|
278
|
+
> Note: Currently this feature is only enabled for examples section.
|
|
279
|
+
|
|
280
|
+
```json
|
|
281
|
+
"codepen": {
|
|
282
|
+
"enable_for": ["examples"],
|
|
283
|
+
"options": {
|
|
284
|
+
"js_external": "https://code.jquery.com/jquery-3.6.0.min.js",
|
|
285
|
+
"js_pre_processor": "babel"
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
`options` can be any valid codepen options. For more visit: [Codepen Prefill options](https://blog.codepen.io/documentation/prefill/#all-the-json-options-0)
|
|
291
|
+
if you want default behaviour then don't pass anything in options.
|
|
292
|
+
|
|
293
|
+
### `create_style: string`
|
|
294
|
+
|
|
295
|
+
To create custom style rules. Example:
|
|
296
|
+
|
|
297
|
+
```json
|
|
298
|
+
"create_style": "nav{background: yellow} footer {background: green}"
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Here the nav and footer style rule is to attached to the HTML's `style` tag.
|
|
302
|
+
|
|
303
|
+
### `add_scripts: string`
|
|
304
|
+
|
|
305
|
+
To create custom scripts. Example:
|
|
306
|
+
|
|
307
|
+
```json
|
|
308
|
+
"create_style": "function foo(){console.log('foo')} function bar() {console.log('bar')}"
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Here the script is to attached to the HTML's `script` tag.
|
|
312
|
+
|
|
313
|
+
### `add_style_path: Array<{}>`
|
|
314
|
+
|
|
315
|
+
Use this option to add third party css library.
|
|
316
|
+
|
|
317
|
+
> Note: You have to pass an array of object, and object keys are actually the attributes which you want in you link tag.
|
|
318
|
+
|
|
319
|
+
Example:
|
|
320
|
+
|
|
321
|
+
```json
|
|
322
|
+
"add_style_path": [
|
|
323
|
+
{
|
|
324
|
+
"href": "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css",
|
|
325
|
+
"integrity": "sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1",
|
|
326
|
+
"crossorigin": "anonymous"
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
#### Properties
|
|
332
|
+
|
|
333
|
+
Any valid [style tag attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style)
|
|
334
|
+
|
|
335
|
+
### `add_script_path: Array<{}>`
|
|
336
|
+
|
|
337
|
+
Use this option to add third party js library.
|
|
338
|
+
|
|
339
|
+
> Note: You have to pass an array of object, and object keys are actually the attributes which you want in you script tag.
|
|
340
|
+
|
|
341
|
+
Example:
|
|
342
|
+
|
|
343
|
+
```json
|
|
344
|
+
"add_script_path": [
|
|
345
|
+
{
|
|
346
|
+
"href": "https://code.jquery.com/jquery-3.5.1.js",
|
|
347
|
+
"integrity": "sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=",
|
|
348
|
+
"crossorigin": "anonymous"
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Properties
|
|
354
|
+
|
|
355
|
+
Any valid [script tag attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
|
|
356
|
+
|
|
357
|
+
### `footer: string | HTML`
|
|
358
|
+
|
|
359
|
+
Thing which you want to render as the footer. You can either pass a string or HTML.
|
|
360
|
+
Use HTML to overwrite the default HTML.
|
|
361
|
+
|
|
362
|
+
```json
|
|
363
|
+
"footer": "This is footer"
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### `static_dir: Array<string>`
|
|
367
|
+
|
|
368
|
+
To include static files. Example:
|
|
369
|
+
|
|
370
|
+
```json
|
|
371
|
+
"static_dir": ["./static"],
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
This will copy the static folder to the output dir.
|
|
375
|
+
|
|
376
|
+
> Note: If the directory doesn't exists then you may get an error. Also directory is relative to your jsdoc config file.
|
|
377
|
+
|
|
378
|
+
This will not flatten then directory it keep the directory structure as it is.
|
|
379
|
+
|
|
380
|
+
### `include_css: Array<string>`
|
|
381
|
+
|
|
382
|
+
To include css files. Example:
|
|
383
|
+
|
|
384
|
+
```json
|
|
385
|
+
"include_css": ["./static/index.css", "./src/docs/index.css"]
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
> Note: You are not required to manually copy file to output dir
|
|
389
|
+
|
|
390
|
+
It will include the css files to the output dir and also attach a link tag to the html pointing to the included css file.
|
|
391
|
+
|
|
392
|
+
### `include_js: Array<string>`
|
|
393
|
+
|
|
394
|
+
To include js files. Example:
|
|
395
|
+
|
|
396
|
+
```json
|
|
397
|
+
"include_js": ["./static/index.js", "./src/docs/index.js"]
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
> Note: You are not required to manually copy file to output dir
|
|
401
|
+
|
|
402
|
+
It will include the js files to the output dir and also attach a script tag to the html pointing to the included js file.
|
|
403
|
+
|
|
404
|
+
### Example `theme_opts`
|
|
405
|
+
|
|
406
|
+
```json
|
|
407
|
+
"opts":{
|
|
408
|
+
"theme_opts":{
|
|
409
|
+
"theme": "dark",
|
|
410
|
+
"title": "clean-jsdoc-theme",
|
|
411
|
+
"menu": [
|
|
412
|
+
{
|
|
413
|
+
"title": "Website",
|
|
414
|
+
"link": "https://ankdev.me/clean-jsdoc-theme/index.html",
|
|
415
|
+
"target": "_blank",
|
|
416
|
+
"class": "some-class",
|
|
417
|
+
"id": "some-id"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"title": "Github",
|
|
421
|
+
"link": "https://github.com/ankitskvmdam/clean-jsdoc-theme/",
|
|
422
|
+
"target": "_blank",
|
|
423
|
+
"class": "some-class",
|
|
424
|
+
"id": "some-id"
|
|
425
|
+
}
|
|
426
|
+
],
|
|
427
|
+
|
|
428
|
+
"meta": [
|
|
429
|
+
{
|
|
430
|
+
"name": "author",
|
|
431
|
+
"content": "Ankit Kumar"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"name": "description",
|
|
435
|
+
"content": "Best Clean and minimal JSDoc 3 Template/Theme"
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"search": {},
|
|
439
|
+
"create_style": "nav{background: yellow}",
|
|
440
|
+
"add_style_path": [
|
|
441
|
+
{
|
|
442
|
+
"href": "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css",
|
|
443
|
+
"integrity": "sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1",
|
|
444
|
+
"crossorigin": "anonymous"
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
"add_scripts": "function foo(){console.log('foo')}",
|
|
448
|
+
"add_script_path": [
|
|
449
|
+
{
|
|
450
|
+
"src": "https://code.jquery.com/jquery-3.5.1.js",
|
|
451
|
+
"integrity": "sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=",
|
|
452
|
+
"crossorigin": "anonymous"
|
|
453
|
+
}
|
|
454
|
+
],
|
|
455
|
+
|
|
456
|
+
"footer": "This is footer",
|
|
457
|
+
"static_dir": ["./static"],
|
|
458
|
+
"include_css": ["./static/index.css", "./src/docs/index.css"],
|
|
459
|
+
"include_js": ["./static/main.js", "./third-party/test/index.js"],
|
|
460
|
+
|
|
461
|
+
"overlay_scrollbar": {
|
|
462
|
+
"options": {
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"resizeable": {
|
|
466
|
+
"navbar": {
|
|
467
|
+
"min": "300",
|
|
468
|
+
"max": "600"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"codepen": {
|
|
472
|
+
"enable_for": ["examples"],
|
|
473
|
+
"options": {
|
|
474
|
+
"js_external": "https://code.jquery.com/jquery-3.6.0.min.js",
|
|
475
|
+
"js_pre_processor": "babel"
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### Cheat sheet
|
|
483
|
+
|
|
484
|
+
| name | default | use case | expected value(s) |
|
|
485
|
+
| ------------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ------------------------- |
|
|
486
|
+
| `theme` | `"light"` | To set the theme variant | `"light" or "dark"` |
|
|
487
|
+
| `title` | `null` | To set the title | `HTML` or `string` |
|
|
488
|
+
| `menu` | `null` | To render extra link in navbar | Array of Object(s) |
|
|
489
|
+
| `meta` | `null` | Meta tag attributes | Array of Object(s) |
|
|
490
|
+
| `search` | `{}` | To render search or not | Fuse.js options |
|
|
491
|
+
| `resizeable` | `{}` | To make certain element resizeable | `Object` |
|
|
492
|
+
| `codepen` | `{}` | To open code in codepen | `Object` |
|
|
493
|
+
| `create_style` | `null` | To create custom style rules | `string` |
|
|
494
|
+
| `add_style_path` | `null` | To add external css libraries/files | Array of Object(s) |
|
|
495
|
+
| `add_scripts` | `null` | To create custom script | `string` |
|
|
496
|
+
| `add_script_path` | `null` | To add external js libraries/files | Array of Object(s) |
|
|
497
|
+
| `footer` | `null` | To render footer | `HTML` or `string` |
|
|
498
|
+
| `static_dir` | `null` | To include static dir | Array of string |
|
|
499
|
+
| `include_css` | `null` | To include css files | Array of string |
|
|
500
|
+
| `include_js` | `null` | To include js files | `string` |
|
|
501
|
+
| `overlay_scrollbar` | `null` | To use overlay scrollbar | Overlay Scrollbar options |
|
|
502
|
+
| `sections` | `["Menu", "Modules", "Classes", "Externals", "Events", "Namespaces", "Mixins", "Tutorials", "Interfaces", "Global"]` | To order navbar sections or to hide/remove sidebar sections | `Array<SECTION_TYPE>` |
|
|
503
|
+
|
|
504
|
+
## Changelog
|
|
505
|
+
|
|
506
|
+
Changelog is moved to [https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/CHANGELOG.md](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/CHANGELOG.md)
|
|
507
|
+
|
|
508
|
+
## Developing
|
|
509
|
+
|
|
510
|
+
Before starting please go through our [contributing guide](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/CONTRIBUTING.md).
|
|
511
|
+
|
|
512
|
+
```bash
|
|
513
|
+
git clone https://github.com/ankitskvmdam/clean-jsdoc-theme.git
|
|
514
|
+
cd clean-jsdoc-theme
|
|
515
|
+
npm install
|
|
516
|
+
npm install jsdoc --no-save
|
|
517
|
+
npm run test
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
`npm run test` will generate files in output folder.
|
|
521
|
+
|
|
522
|
+
## Contributors
|
|
523
|
+
|
|
524
|
+
<a href="https://github.com/ankitskvmdam/clean-jsdoc-theme/graphs/contributors">
|
|
525
|
+
<img src="https://contrib.rocks/image?repo=ankitskvmdam/clean-jsdoc-theme" />
|
|
526
|
+
</a>
|
|
527
|
+
|
|
528
|
+
## Contact
|
|
529
|
+
|
|
530
|
+
If you like my work, then give me a <a href="https://github.com/ankitskvmdam/clean-jsdoc-theme" data-icon="octicon-star" aria-label="Star ankitskvmdam/clean-jsdoc-theme on GitHub">star</a>. This will act as a driving force to add new feature more frequently. <br>
|
|
531
|
+
Mail me at: <a href="mailto:hello@ankdev.me">hello@ankdev.me</a> <br>
|
|
532
|
+
|
|
533
|
+
## License
|
|
534
|
+
|
|
535
|
+
Licensed under the MIT license.
|