docs: add alias
This commit is contained in:
parent
c4aa22c56d
commit
7fb5ce6c84
4 changed files with 24 additions and 8 deletions
|
|
@ -250,11 +250,12 @@ window.$docsify = {
|
||||||
|
|
||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
|
|
||||||
Set the route alias. You can freely manage routing rules.
|
Set the route alias. You can freely manage routing rules. Supports RegExp.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
window.$docsify = {
|
window.$docsify = {
|
||||||
alias: {
|
alias: {
|
||||||
|
'/foo/(+*)': '/bar/$1', // supports regexp
|
||||||
'/zh-cn/changelog': '/changelog',
|
'/zh-cn/changelog': '/changelog',
|
||||||
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
|
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
|
||||||
}
|
}
|
||||||
|
|
@ -298,6 +299,8 @@ Note that if you are running an external script, e.g. an embedded jsfiddle demo,
|
||||||
|
|
||||||
## no-emoji
|
## no-emoji
|
||||||
|
|
||||||
|
- type: `Boolean`
|
||||||
|
|
||||||
Disabled emoji parse.
|
Disabled emoji parse.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
@ -308,6 +311,8 @@ window.$docsify = {
|
||||||
|
|
||||||
## merge-navbar
|
## merge-navbar
|
||||||
|
|
||||||
|
- type: `Boolean`
|
||||||
|
|
||||||
Navbar will be merged with the sidebar on smaller screens.
|
Navbar will be merged with the sidebar on smaller screens.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
@ -317,6 +322,9 @@ window.$docsify = {
|
||||||
```
|
```
|
||||||
|
|
||||||
## format-updated
|
## format-updated
|
||||||
|
|
||||||
|
- type: `String|Function`
|
||||||
|
|
||||||
We can display the file update date through **{docsify-updated<span>}</span>** variable. And format it by `formatUpdated`.
|
We can display the file update date through **{docsify-updated<span>}</span>** variable. And format it by `formatUpdated`.
|
||||||
See https://github.com/lukeed/tinydate#patterns
|
See https://github.com/lukeed/tinydate#patterns
|
||||||
```js
|
```js
|
||||||
|
|
@ -333,6 +341,9 @@ window.$docsify = {
|
||||||
|
|
||||||
## external-link-target
|
## external-link-target
|
||||||
|
|
||||||
|
- type: `String`
|
||||||
|
- default: `_self`
|
||||||
|
|
||||||
Target to open external links. Default `'_blank'` (new window/tab)
|
Target to open external links. Default `'_blank'` (new window/tab)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
@ -342,6 +353,10 @@ window.$docsify = {
|
||||||
```
|
```
|
||||||
|
|
||||||
## router-mode
|
## router-mode
|
||||||
|
|
||||||
|
- type: `String`
|
||||||
|
- default: `history`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
window.$docsify = {
|
window.$docsify = {
|
||||||
routerMode: 'history' // default: 'hash'
|
routerMode: 'history' // default: 'hash'
|
||||||
|
|
|
||||||
|
|
@ -250,11 +250,12 @@ window.$docsify = {
|
||||||
|
|
||||||
- Typ: `Object`
|
- Typ: `Object`
|
||||||
|
|
||||||
Verwende alternative Routen. Du kannst sie ungehindert anpassen.
|
Verwende alternative Routen. Du kannst sie ungehindert anpassen. Supports RegExp.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
window.$docsify = {
|
window.$docsify = {
|
||||||
alias: {
|
alias: {
|
||||||
|
'/foo/(+*)': '/bar/$1', // supports regexp
|
||||||
'/zh-cn/changelog': '/changelog',
|
'/zh-cn/changelog': '/changelog',
|
||||||
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
|
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,7 @@
|
||||||
<script>
|
<script>
|
||||||
window.$docsify = {
|
window.$docsify = {
|
||||||
alias: {
|
alias: {
|
||||||
'/de-de/changelog': '/changelog',
|
'.*?/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
|
||||||
'/zh-cn/changelog': '/changelog',
|
|
||||||
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
|
|
||||||
},
|
},
|
||||||
auto2top: true,
|
auto2top: true,
|
||||||
coverpage: true,
|
coverpage: true,
|
||||||
|
|
|
||||||
|
|
@ -258,12 +258,13 @@ window.$docsify = {
|
||||||
|
|
||||||
- 类型:`Object`
|
- 类型:`Object`
|
||||||
|
|
||||||
定义路由别名,可以更自由的定义路由规则。
|
定义路由别名,可以更自由的定义路由规则。 支持正则。
|
||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
window.$docsify = {
|
window.$docsify = {
|
||||||
alias: {
|
alias: {
|
||||||
|
'/foo/(+*)': '/bar/$1', // supports regexp
|
||||||
'/zh-cn/changelog': '/changelog',
|
'/zh-cn/changelog': '/changelog',
|
||||||
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
|
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
|
||||||
}
|
}
|
||||||
|
|
@ -327,6 +328,7 @@ window.$docsify = {
|
||||||
```
|
```
|
||||||
|
|
||||||
## format-updated
|
## format-updated
|
||||||
|
|
||||||
我们可以显示文档更新日期通过 **{docsify-updated<span>}</span>** 变量. 并且格式化日期通过 `formatUpdated`.
|
我们可以显示文档更新日期通过 **{docsify-updated<span>}</span>** 变量. 并且格式化日期通过 `formatUpdated`.
|
||||||
参考 https://github.com/lukeed/tinydate#patterns
|
参考 https://github.com/lukeed/tinydate#patterns
|
||||||
```js
|
```js
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue