docs: add alias
This commit is contained in:
parent
c4aa22c56d
commit
7fb5ce6c84
4 changed files with 24 additions and 8 deletions
|
|
@ -258,12 +258,13 @@ window.$docsify = {
|
|||
|
||||
- 类型:`Object`
|
||||
|
||||
定义路由别名,可以更自由的定义路由规则。
|
||||
定义路由别名,可以更自由的定义路由规则。 支持正则。
|
||||
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
alias: {
|
||||
'/foo/(+*)': '/bar/$1', // supports regexp
|
||||
'/zh-cn/changelog': '/changelog',
|
||||
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
|
||||
}
|
||||
|
|
@ -327,7 +328,8 @@ window.$docsify = {
|
|||
```
|
||||
|
||||
## format-updated
|
||||
我们可以显示文档更新日期通过 **{docsify-updated<span>}</span>** 变量. 并且格式化日期通过 `formatUpdated`.
|
||||
|
||||
我们可以显示文档更新日期通过 **{docsify-updated<span>}</span>** 变量. 并且格式化日期通过 `formatUpdated`.
|
||||
参考 https://github.com/lukeed/tinydate#patterns
|
||||
```js
|
||||
window.$docsify = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue