Skip to content

Commit

Permalink
docs: add docs about "versions"
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Nov 20, 2018
1 parent da25d1b commit 8a64653
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
16 changes: 16 additions & 0 deletions website/docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,22 @@ The text for *edit link*.

Centering contents.

## versions

- Type: `Versions`

When specified, Docute will show a version selector at the sidebar.

```ts
interface Versions {
// The version number, like `v1`
[version: string]: {
// The link to this version of docs
link: string
}
}
```

## overrides

- Type: `{[path: string]: LocaleOptions}`
Expand Down
16 changes: 16 additions & 0 deletions website/docs/zh/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,22 @@ https://github.com/USER/REPO/blob/master/docs

内容居中。

## versions

- 类型: `Versions`

设置此项之后, Docute 会在侧边栏显示一个版本选择器。

```ts
interface Versions {
// 版本号, 比如 `v1`
[version: string]: {
// 指向相关文档的链接
link: string
}
}
```

## overrides

- 类型:`{[path: string]: LocaleOptions}`
Expand Down
2 changes: 1 addition & 1 deletion website/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ new Docute({
}
],
versions: {
v4: {
'v4 (Latest)': {
link: '/'
},
v3: {
Expand Down

0 comments on commit 8a64653

Please sign in to comment.