Skip to content

Commit

Permalink
docs(theme-default): add config docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Jan 31, 2024
1 parent aa55e22 commit 2d313f1
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 14 deletions.
19 changes: 12 additions & 7 deletions docs/themes/default/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,16 @@ export default {
- [Default Theme > Config > logo](#logo)
- [Default Theme > Config > colorMode](#colormode)

### logoAlt

- Type: `null | string`

- Details:

Specify the alt text of the logo image.

If not specified, defaults to be the same as the site title.

### repo

- Type: `string`
Expand Down Expand Up @@ -248,7 +258,7 @@ export default {
If you want to set different sidebar for different sub paths, you can set this option to a _sidebar object_:

- The key should be the path prefix.
- The value should be a _sidebar array_.
- The value should be a _sidebar array_ or set to `'heading'` to automatically generate the sidebar from the page headers for just the corresponding path.

- Example 1:

Expand Down Expand Up @@ -294,12 +304,7 @@ export default {
children: ['/guide/introduction.md', '/guide/getting-started.md'],
},
],
'/reference/': [
{
text: 'Reference',
children: ['/reference/cli.md', '/reference/config.md'],
},
],
'/reference/': 'heading',
},
}),
}
Expand Down
16 changes: 16 additions & 0 deletions docs/themes/default/locale.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@ export default {
}
```

### navbarLabel

- Type: `null | string`

- Details:

`aria-label` value for main navigation in navbar.

### pageNavbarLabel

- Type: `null | string`

- Details:

`aria-label` value for next/previous page navigation.

## editLinkText

- Type: `string`
Expand Down
19 changes: 12 additions & 7 deletions docs/zh/themes/default/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,16 @@ export default {
- [默认主题 > 配置 > logo](#logo)
- [默认主题 > 配置 > colorMode](#colormode)

### logoAlt

- 类型:`null | string`

- 详情:

指定 Logo 图片的替代文字。

当未指定时,将默认与站点标题相同。

### repo

- 类型: `string`
Expand Down Expand Up @@ -248,7 +258,7 @@ export default {
如果你想在不同子路径中使用不同的侧边栏,你可以将该配置项设置为 _侧边栏对象_

- Key 为路径前缀。
- Value 为 _侧边栏数组_
- Value 为 _侧边栏数组_ `"heading"` 以自动为相应路径生成基于标题的侧边栏

- 示例 1:

Expand Down Expand Up @@ -294,12 +304,7 @@ export default {
children: ['/guide/introduction.md', '/guide/getting-started.md'],
},
],
'/reference/': [
{
text: 'Reference',
children: ['/reference/cli.md', '/reference/config.md'],
},
],
'/reference/': 'heading',
},
}),
}
Expand Down
16 changes: 16 additions & 0 deletions docs/zh/themes/default/locale.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@ export default {
}
```

### navbarLabel

- 类型:`null | string`

- 详情:

导航栏中主导航 `aria-label` 属性的值。

### pageNavbarLabel

- 类型:`null | string`

- 详情:

下一页/上一页导航 `aria-label` 属性的值

## editLinkText

- 类型: `string`
Expand Down

0 comments on commit 2d313f1

Please sign in to comment.