Skip to content

Commit

Permalink
i18n(zh-CN): update frontmatter.md (#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
Genteure authored Oct 10, 2023
1 parent 54e3c86 commit a02f02e
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions docs/src/content/docs/zh/reference/frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,21 @@ pagefind: false

### `sidebar`

**类型:** `{ label?: string; order?: number; hidden?: boolean; badge?: string | BadgeConfig }`
**类型:** [`SidebarConfig`](#sidebarconfig)

在使用自动生成的链接组时,控制如何在[侧边栏](/zh/reference/configuration/#sidebar)中显示此页面。
在使用自动生成的链接分组时,控制如何在[侧边栏](/zh/reference/configuration/#sidebar)中显示此页面。

#### `SidebarConfig`

```ts
interface SidebarConfig {
label?: string;
order?: number;
hidden?: boolean;
badge?: string | BadgeConfig;
attrs?: Record<string, string | number | boolean | undefined>;
}
```

#### `label`

Expand Down Expand Up @@ -299,3 +311,19 @@ sidebar:
variant: caution
---
```

#### `attrs`

**类型:** `Record<string, string | number | boolean | undefined>`

给自动生成的侧边栏分组的链接添加的 HTML 属性。

```md
---
title: 新标签页中打开页面
sidebar:
# 在新标签页中打开页面
attrs:
target: _blank
---
```

0 comments on commit a02f02e

Please sign in to comment.