You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.md
+61-51
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,8 @@ You can configure the `window.$docsify`.
14
14
15
15
## el
16
16
17
-
* Type: `String`
18
-
* Default: `#app`
17
+
- Type: `String`
18
+
- Default: `#app`
19
19
20
20
The DOM element to be mounted on initialization. It can be a CSS selector string or an actual HTMLElement.
21
21
@@ -27,8 +27,8 @@ window.$docsify = {
27
27
28
28
## repo
29
29
30
-
* Type: `String`
31
-
* Default: `null`
30
+
- Type: `String`
31
+
- Default: `null`
32
32
33
33
Configure the repository url or a string of `username/repo` can add the [GitHub Corner](http://tholman.com/github-corners/) widget in the top right corner of the site.
34
34
@@ -42,8 +42,8 @@ window.$docsify = {
42
42
43
43
## maxLevel
44
44
45
-
* Type: `Number`
46
-
* Default: `6`
45
+
- Type: `Number`
46
+
- Default: `6`
47
47
48
48
Maximum Table of content level.
49
49
@@ -55,8 +55,8 @@ window.$docsify = {
55
55
56
56
## loadNavbar
57
57
58
-
* Type: `Boolean|String`
59
-
* Default: `false`
58
+
- Type: `Boolean|String`
59
+
- Default: `false`
60
60
61
61
Loads navbar from the Markdown file `_navbar.md` if **true**, or else from the path specified.
62
62
@@ -72,8 +72,8 @@ window.$docsify = {
72
72
73
73
## loadSidebar
74
74
75
-
* Type: `Boolean|String`
76
-
* Default: `false`
75
+
- Type: `Boolean|String`
76
+
- Default: `false`
77
77
78
78
Loads sidebar from the Markdown file `_sidebar.md` if **true**, or else from the path specified.
79
79
@@ -89,8 +89,8 @@ window.$docsify = {
89
89
90
90
## subMaxLevel
91
91
92
-
* Type: `Number`
93
-
* Default: `0`
92
+
- Type: `Number`
93
+
- Default: `0`
94
94
95
95
Add table of contents (TOC) in custom sidebar.
96
96
@@ -102,8 +102,8 @@ window.$docsify = {
102
102
103
103
## auto2top
104
104
105
-
* Type: `Boolean`
106
-
* Default: `false`
105
+
- Type: `Boolean`
106
+
- Default: `false`
107
107
108
108
Scrolls to the top of the screen when the route is changed.
109
109
@@ -115,8 +115,8 @@ window.$docsify = {
115
115
116
116
## homepage
117
117
118
-
* Type: `String`
119
-
* Default: `README.md`
118
+
- Type: `String`
119
+
- Default: `README.md`
120
120
121
121
`README.md` in your docs folder will be treated as homepage for your website, but sometimes you may need to serve another file as your homepage.
122
122
@@ -133,7 +133,7 @@ window.$docsify = {
133
133
134
134
## basePath
135
135
136
-
* Type: `String`
136
+
- Type: `String`
137
137
138
138
Base path of the website. You can set it to another directory or another domain name.
139
139
@@ -152,8 +152,8 @@ window.$docsify = {
152
152
153
153
## coverpage
154
154
155
-
* Type: `Boolean|String|String[]|Object`
156
-
* Default: `false`
155
+
- Type: `Boolean|String|String[]|Object`
156
+
- Default: `false`
157
157
158
158
Activate the [cover feature](cover.md). If true, it will load from `_coverpage.md`.
159
159
@@ -175,9 +175,21 @@ window.$docsify = {
175
175
};
176
176
```
177
177
178
+
## logo
179
+
180
+
- Type: `String`
181
+
182
+
Website logo as it appears in the sidebar, you can resize by CSS.
183
+
184
+
```js
185
+
window.$docsify= {
186
+
logo:'/_media/icon.svg'
187
+
};
188
+
```
189
+
178
190
## name
179
191
180
-
* Type: `String`
192
+
- Type: `String`
181
193
182
194
Website name as it appears in the sidebar.
183
195
@@ -189,8 +201,8 @@ window.$docsify = {
189
201
190
202
## nameLink
191
203
192
-
* Type: `String`
193
-
* Default: `window.location.pathname`
204
+
- Type: `String`
205
+
- Default: `window.location.pathname`
194
206
195
207
The name of the link.
196
208
@@ -208,7 +220,7 @@ window.$docsify = {
208
220
209
221
## markdown
210
222
211
-
* Type: `Function`
223
+
- Type: `Function`
212
224
213
225
See [Markdown configuration](markdown.md).
214
226
@@ -234,7 +246,7 @@ window.$docsify = {
234
246
235
247
## themeColor
236
248
237
-
* Type: `String`
249
+
- Type: `String`
238
250
239
251
Customize the theme color. Use [CSS3 variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) feature and polyfill in old browser.
240
252
@@ -246,7 +258,7 @@ window.$docsify = {
246
258
247
259
## alias
248
260
249
-
* Type: `Object`
261
+
- Type: `Object`
250
262
251
263
Set the route alias. You can freely manage routing rules. Supports RegExp.
252
264
@@ -264,7 +276,7 @@ window.$docsify = {
264
276
265
277
## autoHeader
266
278
267
-
* type: `Boolean`
279
+
- type: `Boolean`
268
280
269
281
If `loadSidebar` and `autoHeader` are both enabled, for each link in `_sidebar.md`, prepend a header to the page before converting it to html. Compare [#78](https://github.com/QingWei-Li/docsify/issues/78).
270
282
@@ -277,7 +289,7 @@ window.$docsify = {
277
289
278
290
## executeScript
279
291
280
-
* type: `Boolean`
292
+
- type: `Boolean`
281
293
282
294
Execute the script on the page. Only parse the first script tag([demo](themes)). If Vue is present, it is turned on by default.
283
295
@@ -299,7 +311,7 @@ Note that if you are running an external script, e.g. an embedded jsfiddle demo,
299
311
300
312
## noEmoji
301
313
302
-
* type: `Boolean`
314
+
- type: `Boolean`
303
315
304
316
Disabled emoji parse.
305
317
@@ -311,7 +323,7 @@ window.$docsify = {
311
323
312
324
## mergeNavbar
313
325
314
-
* type: `Boolean`
326
+
- type: `Boolean`
315
327
316
328
Navbar will be merged with the sidebar on smaller screens.
317
329
@@ -323,7 +335,7 @@ window.$docsify = {
323
335
324
336
## formatUpdated
325
337
326
-
* type: `String|Function`
338
+
- type: `String|Function`
327
339
328
340
We can display the file update date through **{docsify-updated<span>}</span>** variable. And format it by `formatUpdated`.
329
341
See https://github.com/lukeed/tinydate#patterns
@@ -342,8 +354,8 @@ window.$docsify = {
342
354
343
355
## externalLinkTarget
344
356
345
-
* type: `String`
346
-
* default: `_blank`
357
+
- type: `String`
358
+
- default: `_blank`
347
359
348
360
Target to open external links. Default `'_blank'` (new window/tab)
349
361
@@ -355,8 +367,8 @@ window.$docsify = {
355
367
356
368
## routerMode
357
369
358
-
* type: `String`
359
-
* default: `history`
370
+
- type: `String`
371
+
- default: `history`
360
372
361
373
```js
362
374
window.$docsify= {
@@ -366,7 +378,7 @@ window.$docsify = {
366
378
367
379
## noCompileLinks
368
380
369
-
* type: `Array`
381
+
- type: `Array`
370
382
371
383
Sometimes we do not want docsify to handle our links. See [#203](https://github.com/QingWei-Li/docsify/issues/203)
372
384
@@ -378,7 +390,7 @@ window.$docsify = {
378
390
379
391
## onlyCover
380
392
381
-
* type: `Boolean`
393
+
- type: `Boolean`
382
394
383
395
Only coverpage is loaded when visiting the home page.
384
396
@@ -390,7 +402,7 @@ window.$docsify = {
390
402
391
403
## requestHeaders
392
404
393
-
* type: `Object`
405
+
- type: `Object`
394
406
395
407
Set the request resource headers.
396
408
@@ -404,7 +416,7 @@ window.$docsify = {
404
416
405
417
## ext
406
418
407
-
* type: `String`
419
+
- type: `String`
408
420
409
421
Request file extension.
410
422
@@ -416,53 +428,51 @@ window.$docsify = {
416
428
417
429
## fallbackLanguages
418
430
419
-
* type: `Array<string>`
431
+
- type: `Array<string>`
420
432
421
433
List of languages that will fallback to the default language when a page is request and didn't exists for the given local.
422
434
423
435
Example:
424
436
425
-
- try to fetch the page of `/de/overview`. If this page exists, it'll be displayed
426
-
- then try to fetch the default page `/overview` (depending on the default language). If this page exists, it'll be displayed
427
-
- then display 404 page.
428
-
437
+
- try to fetch the page of `/de/overview`. If this page exists, it'll be displayed
438
+
- then try to fetch the default page `/overview` (depending on the default language). If this page exists, it'll be displayed
439
+
- then display 404 page.
429
440
430
441
```js
431
442
window.$docsify= {
432
-
fallbackLanguages: [
433
-
"fr",
434
-
"de"
435
-
]
443
+
fallbackLanguages: ['fr', 'de']
436
444
};
437
445
```
438
446
439
-
440
447
## notFoundPage
441
448
442
-
* type: `Boolean` | `String` | `Object`
449
+
- type: `Boolean` | `String` | `Object`
443
450
444
451
Load the `_404.md` file:
452
+
445
453
```js
446
454
window.$docsify= {
447
455
notFoundPage:true
448
456
};
449
457
```
450
458
451
459
Load the customised path of the 404 page:
460
+
452
461
```js
453
462
window.$docsify= {
454
463
notFoundPage:'my404.md'
455
464
};
456
465
```
457
466
458
467
Load the right 404 page according to the localisation:
468
+
459
469
```js
460
470
window.$docsify= {
461
471
notFoundPage: {
462
472
'/':'_404.md',
463
-
'/de':'de/_404.md',
473
+
'/de':'de/_404.md'
464
474
}
465
475
};
466
476
```
467
-
> Note: The options with fallbackLanguages didn't work with the `notFoundPage` options.
468
477
478
+
> Note: The options with fallbackLanguages didn't work with the `notFoundPage` options.
0 commit comments