Skip to content

Commit

Permalink
chore: optimize theme doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyuan0704 committed Oct 7, 2022
1 parent d16a79e commit fbb4ed5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/en/api/config-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ export default defineConfig({

## sidebar

- Type: `Array` | `Object`
- Type: `Object`

The sidebar of the site.The config is a map for `SidebarGroup`, which has following type:
The sidebar of the site.The config is a object, which

```ts
// The key is the path of the sidebar group
// The value is the sidebar group
type Sidebar = Record<string, SidebarGroup[]>;

interface SidebarGroup {
Expand Down
6 changes: 4 additions & 2 deletions docs/zh/api/config-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ export default defineConfig({

## sidebar

- Type: `Array` | `Object`
- Type: `Object`

网站的侧边栏。配置是 `SidebarGroup` 的映射类型,具有以下类型
网站的侧边栏。配置为一个对象,类型如下

```ts
// key 为 SidebarGroup 的路径
// value 为 SidebarGroup
type Sidebar = Record<string, SidebarGroup[]>;

interface SidebarGroup {
Expand Down

1 comment on commit fbb4ed5

@vercel
Copy link

@vercel vercel bot commented on fbb4ed5 Oct 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.