docs: add mutiple covers
This commit is contained in:
parent
bd7ee84241
commit
4bdcee2cb3
12 changed files with 262 additions and 93 deletions
|
|
@ -26,9 +26,9 @@ Set `coverpage` to **true**, and create a `_coverpage.md`:
|
|||
|
||||
> A magical documentation site generator.
|
||||
|
||||
- Simple and lightweight (~18kB gzipped)
|
||||
- No statically built html files
|
||||
- Multiple themes
|
||||
* Simple and lightweight (~18kB gzipped)
|
||||
* No statically built html files
|
||||
* Multiple themes
|
||||
|
||||
[GitHub](https://github.com/QingWei-Li/docsify/)
|
||||
[Get Started](#docsify)
|
||||
|
|
@ -49,8 +49,51 @@ The background color is generated randomly by default. You can customize the bac
|
|||
[Get Started](#quick-start)
|
||||
|
||||
<!-- background image -->
|
||||
|
||||

|
||||
|
||||
<!-- background color -->
|
||||
|
||||

|
||||
```
|
||||
|
||||
## Coverpage as homepage
|
||||
|
||||
Normal, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by [onlyCover option](configuration.md#onlycover).
|
||||
|
||||
## Multiple covers
|
||||
|
||||
If your docs site is in more than one language, it may be useful to set multiple covers.
|
||||
|
||||
For example, your docs structure is like this
|
||||
|
||||
```text
|
||||
.
|
||||
└── docs
|
||||
├── README.md
|
||||
├── guide.md
|
||||
├── _coverpage.md
|
||||
└── zh-cn
|
||||
├── README.md
|
||||
└── guide.md
|
||||
└── _coverpage.md
|
||||
```
|
||||
|
||||
Now, you can set
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
coverpage: ['/', '/zh-cn/']
|
||||
};
|
||||
```
|
||||
|
||||
Or a special file name
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
coverpage: {
|
||||
'/': 'cover.md',
|
||||
'/zh-cn/': 'cover.md'
|
||||
}
|
||||
};
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue