@@ -22,7 +22,7 @@ The DOM element to be mounted on initialization. It can be a CSS selector string
22
22
``` js
23
23
window .$docsify = {
24
24
el: ' #app'
25
- };
25
+ }
26
26
```
27
27
28
28
## repo
@@ -37,7 +37,7 @@ window.$docsify = {
37
37
repo: ' docsifyjs/docsify' ,
38
38
// or
39
39
repo: ' https://github.com/docsifyjs/docsify/'
40
- };
40
+ }
41
41
```
42
42
43
43
## maxLevel
@@ -50,7 +50,7 @@ Maximum Table of content level.
50
50
``` js
51
51
window .$docsify = {
52
52
maxLevel: 4
53
- };
53
+ }
54
54
```
55
55
56
56
## loadNavbar
@@ -67,7 +67,7 @@ window.$docsify = {
67
67
68
68
// load from nav.md
69
69
loadNavbar: ' nav.md'
70
- };
70
+ }
71
71
```
72
72
73
73
## loadSidebar
@@ -84,9 +84,24 @@ window.$docsify = {
84
84
85
85
// load from summary.md
86
86
loadSidebar: ' summary.md'
87
- };
87
+ }
88
88
```
89
89
90
+ ## hideSidebar
91
+
92
+ - Type : ` Boolean `
93
+ - Default: ` true `
94
+
95
+ This option will completely hide your sidebar and wont render any content of the side even .
96
+
97
+ ```` js
98
+ window .$docsify = {
99
+
100
+ hideSidebar: true ,
101
+
102
+ };
103
+
104
+
90
105
## subMaxLevel
91
106
92
107
- Type: ` Number`
@@ -98,7 +113,7 @@ Add table of contents (TOC) in custom sidebar.
98
113
window.$docsify = {
99
114
subMaxLevel: 2
100
115
};
101
- ```
116
+ ` ` ` `
102
117
103
118
## auto2top
104
119
@@ -110,7 +125,7 @@ Scrolls to the top of the screen when the route is changed.
110
125
` ` ` js
111
126
window .$docsify = {
112
127
auto2top: true
113
- };
128
+ }
114
129
```
115
130
116
131
## homepage
@@ -128,7 +143,7 @@ window.$docsify = {
128
143
// Or use the readme in your repo
129
144
homepage:
130
145
'https://raw.githubusercontent.com/docsifyjs/docsify/master/README.md'
131
- };
146
+ }
132
147
` ` `
133
148
134
149
## basePath
@@ -147,7 +162,7 @@ window.$docsify = {
147
162
// Even can load files from other repo
148
163
basePath:
149
164
'https://raw.githubusercontent.com/ryanmcdermott/clean-code-javascript/master/'
150
- };
165
+ }
151
166
` ` `
152
167
153
168
## relativePath
@@ -187,7 +202,7 @@ window.$docsify = {
187
202
188
203
// Relative path disabled (default value)
189
204
relativePath: false
190
- };
205
+ }
191
206
` ` `
192
207
193
208
## coverpage
@@ -212,7 +227,7 @@ window.$docsify = {
212
227
'/': 'cover.md',
213
228
'/zh-cn/': 'cover.md'
214
229
}
215
- };
230
+ }
216
231
` ` `
217
232
218
233
## logo
@@ -224,7 +239,7 @@ Website logo as it appears in the sidebar, you can resize by CSS.
224
239
` ` ` js
225
240
window.$docsify = {
226
241
logo: '/_media/icon.svg'
227
- };
242
+ }
228
243
` ` `
229
244
230
245
## name
@@ -236,15 +251,15 @@ Website name as it appears in the sidebar.
236
251
` ` ` js
237
252
window.$docsify = {
238
253
name: 'docsify'
239
- };
254
+ }
240
255
` ` `
241
256
242
257
The name field can also contain custom HTML for easier customization:
243
258
244
259
` ` ` js
245
260
window.$docsify = {
246
261
name: '<span>docsify</span>'
247
- };
262
+ }
248
263
` ` `
249
264
250
265
## nameLink
@@ -263,7 +278,7 @@ window.$docsify = {
263
278
'/zh-cn/': '/zh-cn/',
264
279
'/': '/'
265
280
}
266
- };
281
+ }
267
282
` ` `
268
283
269
284
## markdown
@@ -287,9 +302,9 @@ window.$docsify = {
287
302
// function
288
303
markdown: function(marked, renderer) {
289
304
// ...
290
- return marked;
305
+ return marked
291
306
}
292
- };
307
+ }
293
308
` ` `
294
309
295
310
## themeColor
@@ -301,7 +316,7 @@ Customize the theme color. Use [CSS3 variables](https://developer.mozilla.org/en
301
316
` ` ` js
302
317
window.$docsify = {
303
318
themeColor: '#3F51B5'
304
- };
319
+ }
305
320
` ` `
306
321
307
322
## alias
@@ -319,7 +334,7 @@ window.$docsify = {
319
334
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG',
320
335
'/.*/_sidebar.md': '/_sidebar.md' // See #301
321
336
}
322
- };
337
+ }
323
338
` ` `
324
339
325
340
## autoHeader
@@ -332,7 +347,7 @@ If `loadSidebar` and `autoHeader` are both enabled, for each link in `_sidebar.m
332
347
window.$docsify = {
333
348
loadSidebar: true,
334
349
autoHeader: true
335
- };
350
+ }
336
351
` ` `
337
352
338
353
## executeScript
@@ -344,7 +359,7 @@ Execute the script on the page. Only parse the first script tag([demo](themes)).
344
359
` ` ` js
345
360
window.$docsify = {
346
361
executeScript: true
347
- };
362
+ }
348
363
` ` `
349
364
350
365
` ` ` markdown
@@ -366,7 +381,7 @@ Disabled emoji parse.
366
381
` ` ` js
367
382
window.$docsify = {
368
383
noEmoji: true
369
- };
384
+ }
370
385
` ` `
371
386
372
387
## mergeNavbar
@@ -378,7 +393,7 @@ Navbar will be merged with the sidebar on smaller screens.
378
393
` ` ` js
379
394
window.$docsify = {
380
395
mergeNavbar: true
381
- };
396
+ }
382
397
` ` `
383
398
384
399
## formatUpdated
@@ -395,9 +410,9 @@ window.$docsify = {
395
410
formatUpdated: function(time) {
396
411
// ...
397
412
398
- return time;
413
+ return time
399
414
}
400
- };
415
+ }
401
416
` ` `
402
417
403
418
## externalLinkTarget
@@ -410,7 +425,7 @@ Target to open external links inside the markdown. Default `'_blank'` (new windo
410
425
` ` ` js
411
426
window.$docsify = {
412
427
externalLinkTarget: '_self' // default: '_blank'
413
- };
428
+ }
414
429
` ` `
415
430
416
431
## cornerExternalLinkTarget
@@ -423,7 +438,7 @@ Target to open external link at the top right corner. Default `'_blank'` (new wi
423
438
` ` ` js
424
439
window.$docsify = {
425
440
cornerExternalLinkTarget: '_self' // default: '_blank'
426
- };
441
+ }
427
442
` ` `
428
443
429
444
## externalLinkRel
@@ -436,7 +451,7 @@ Default `'noopener'` (no opener) prevents the newly opened external page (when [
436
451
` ` ` js
437
452
window.$docsify = {
438
453
externalLinkTarget: '' // default: 'noopener'
439
- };
454
+ }
440
455
` ` `
441
456
442
457
## routerMode
@@ -447,7 +462,7 @@ window.$docsify = {
447
462
` ` ` js
448
463
window.$docsify = {
449
464
routerMode: 'history' // default: 'hash'
450
- };
465
+ }
451
466
` ` `
452
467
453
468
## noCompileLinks
@@ -459,7 +474,7 @@ Sometimes we do not want docsify to handle our links. See [#203](https://github.
459
474
` ` ` js
460
475
window.$docsify = {
461
476
noCompileLinks: ['/foo', '/bar/.*']
462
- };
477
+ }
463
478
` ` `
464
479
465
480
## onlyCover
@@ -471,7 +486,7 @@ Only coverpage is loaded when visiting the home page.
471
486
` ` ` js
472
487
window.$docsify = {
473
488
onlyCover: false
474
- };
489
+ }
475
490
` ` `
476
491
477
492
## requestHeaders
@@ -485,7 +500,7 @@ window.$docsify = {
485
500
requestHeaders: {
486
501
'x-token': 'xxx'
487
502
}
488
- };
503
+ }
489
504
` ` `
490
505
491
506
Such as setting the cache
@@ -495,11 +510,9 @@ window.$docsify = {
495
510
requestHeaders: {
496
511
'cache-control': 'max-age=600'
497
512
}
498
- };
513
+ }
499
514
` ` `
500
515
501
-
502
-
503
516
## ext
504
517
505
518
- type: ` String`
@@ -509,7 +522,7 @@ Request file extension.
509
522
` ` ` js
510
523
window.$docsify = {
511
524
ext: '.md'
512
- };
525
+ }
513
526
` ` `
514
527
515
528
## fallbackLanguages
@@ -527,7 +540,7 @@ Example:
527
540
```js
528
541
window.$docsify = {
529
542
fallbackLanguages: [' fr' , ' de' ]
530
- };
543
+ }
531
544
```
532
545
533
546
## notFoundPage
@@ -539,15 +552,15 @@ Load the `_404.md` file:
539
552
```js
540
553
window.$docsify = {
541
554
notFoundPage: true
542
- };
555
+ }
543
556
```
544
557
545
558
Load the customised path of the 404 page:
546
559
547
560
```js
548
561
window.$docsify = {
549
562
notFoundPage: ' my404 .md '
550
- };
563
+ }
551
564
```
552
565
553
566
Load the right 404 page according to the localisation:
@@ -558,7 +571,7 @@ window.$docsify = {
558
571
' / ' : ' _404 .md ' ,
559
572
' / de' : ' de/ _404 .md '
560
573
}
561
- };
574
+ }
562
575
```
563
576
564
577
> Note: The options with fallbackLanguages didn' t work with the ` notFoundPage` options.
0 commit comments