Skip to content

Commit 774abb5

Browse files
committed
add an option to render the navbar when onlyCover is true
1 parent 40e7749 commit 774abb5

File tree

4 files changed

+25907
-82
lines changed

4 files changed

+25907
-82
lines changed

docs/configuration.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The config can also be defined as a function, in which case the first argument i
1616

1717
```html
1818
<script>
19-
window.$docsify = function(vm) {
19+
window.$docsify = function (vm) {
2020
return {
2121
markdown: {
2222
renderer: {
@@ -88,6 +88,22 @@ window.$docsify = {
8888
};
8989
```
9090

91+
## onlyCoverNavbar
92+
93+
- Type: `Boolean`
94+
- Default: `false`
95+
96+
By default the cover page will not show the navbar when
97+
[`onlyCover`](./configuration.md#onlycover) is `true`. Set `onlyCoverNavbar`
98+
to `true` to always show the nav bar.
99+
100+
```js
101+
window.$docsify = {
102+
onlyCover: true,
103+
onlyCoverNavbar: true,
104+
};
105+
```
106+
91107
## loadSidebar
92108

93109
- Type: `Boolean|String`
@@ -319,14 +335,14 @@ window.$docsify = {
319335
markdown: {
320336
smartypants: true,
321337
renderer: {
322-
link: function() {
338+
link: function () {
323339
// ...
324340
},
325341
},
326342
},
327343

328344
// function
329-
markdown: function(marked, renderer) {
345+
markdown: function (marked, renderer) {
330346
// ...
331347
return marked;
332348
},
@@ -435,7 +451,7 @@ See https://github.com/lukeed/tinydate#patterns
435451
window.$docsify = {
436452
formatUpdated: '{MM}/{DD} {HH}:{mm}',
437453

438-
formatUpdated: function(time) {
454+
formatUpdated: function (time) {
439455
// ...
440456

441457
return time;
@@ -522,14 +538,16 @@ window.$docsify = {
522538

523539
- type: `Boolean`
524540

525-
Only coverpage is loaded when visiting the home page.
541+
Only coverpage is loaded when visiting the home page. Users will have to click a link to visit other pages instead of scrolling down.
526542

527543
```js
528544
window.$docsify = {
529545
onlyCover: false,
530546
};
531547
```
532548

549+
By default, the nav bar is not loaded on the cover page. See the [`onlyCoverNavbar`](./configuration.md#onlycovernavbar) option.
550+
533551
## requestHeaders
534552

535553
- type: `Object`

0 commit comments

Comments
 (0)