Skip to content

Commit

Permalink
docs: add alias
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Jul 10, 2017
1 parent c4aa22c commit 7fb5ce6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
17 changes: 16 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,12 @@ window.$docsify = {

- 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
window.$docsify = {
alias: {
'/foo/(+*)': '/bar/$1', // supports regexp
'/zh-cn/changelog': '/changelog',
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
}
Expand Down Expand Up @@ -298,6 +299,8 @@ Note that if you are running an external script, e.g. an embedded jsfiddle demo,

## no-emoji

- type: `Boolean`

Disabled emoji parse.

```js
Expand All @@ -308,6 +311,8 @@ window.$docsify = {

## merge-navbar

- type: `Boolean`

Navbar will be merged with the sidebar on smaller screens.

```js
Expand All @@ -317,6 +322,9 @@ window.$docsify = {
```

## format-updated

- type: `String|Function`

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
```js
Expand All @@ -333,6 +341,9 @@ window.$docsify = {

## external-link-target

- type: `String`
- default: `_self`

Target to open external links. Default `'_blank'` (new window/tab)

```js
Expand All @@ -342,6 +353,10 @@ window.$docsify = {
```

## router-mode

- type: `String`
- default: `history`

```js
window.$docsify = {
routerMode: 'history' // default: 'hash'
Expand Down
5 changes: 3 additions & 2 deletions docs/de-de/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,12 @@ window.$docsify = {

- Typ: `Object`

Verwende alternative Routen. Du kannst sie ungehindert anpassen.
Verwende alternative Routen. Du kannst sie ungehindert anpassen. Supports RegExp.

```js
window.$docsify = {
alias: {
'/foo/(+*)': '/bar/$1', // supports regexp
'/zh-cn/changelog': '/changelog',
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
}
Expand Down Expand Up @@ -317,7 +318,7 @@ window.$docsify = {
```

## format-updated
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
```js
window.$docsify = {
Expand Down
4 changes: 1 addition & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
<script>
window.$docsify = {
alias: {
'/de-de/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'
},
auto2top: true,
coverpage: true,
Expand Down
6 changes: 4 additions & 2 deletions docs/zh-cn/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 7fb5ce6

Please sign in to comment.