Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add an option to render the navbar when onlyCover is true #1706

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The config can also be defined as a function, in which case the first argument i

```html
<script>
window.$docsify = function(vm) {
window.$docsify = function (vm) {
return {
markdown: {
renderer: {
Expand Down Expand Up @@ -88,6 +88,22 @@ window.$docsify = {
};
```

## loadNavbarOnCover

- Type: `Boolean`
- Default: `false`

By default the cover page will not show the navbar when
[`onlyCover`](./configuration.md#onlycover) is `true`. Set `loadNavbarOnCover`
to `true` to always show the nav bar.

```js
window.$docsify = {
onlyCover: true,
loadNavbarOnCover: true,
};
```

## loadSidebar

- Type: `Boolean|String`
Expand Down Expand Up @@ -319,14 +335,14 @@ window.$docsify = {
markdown: {
smartypants: true,
renderer: {
link: function() {
link: function () {
// ...
},
},
},

// function
markdown: function(marked, renderer) {
markdown: function (marked, renderer) {
// ...
return marked;
},
Expand Down Expand Up @@ -435,7 +451,7 @@ See https://github.com/lukeed/tinydate#patterns
window.$docsify = {
formatUpdated: '{MM}/{DD} {HH}:{mm}',

formatUpdated: function(time) {
formatUpdated: function (time) {
// ...

return time;
Expand Down Expand Up @@ -522,14 +538,16 @@ window.$docsify = {

- type: `Boolean`

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

```js
window.$docsify = {
onlyCover: false,
};
```

By default, the nav bar is not shown on the cover page. Control this with the [`loadNavbarOnCover`](./configuration.md#loadnavbaroncover) option.

## requestHeaders

- type: `Object`
Expand Down
Loading