Skip to content

Commit 8b7c055

Browse files
authored
docs: add tip for pageType: doc-wide usage with outline: false (#3005)
1 parent 4a5b6e3 commit 8b7c055

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

website/docs/en/api/config/config-frontmatter.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,19 @@ sidebar: false
231231
---
232232
```
233233

234+
:::tip
235+
`sidebar: false` only hides the sidebar, but the space originally occupied by the sidebar is still reserved. If you want the main content to occupy a wider screen space, you can use [`pageType: doc-wide`](#pagetype) with `sidebar: false`:
236+
237+
```yaml
238+
---
239+
pageType: doc-wide
240+
sidebar: false
241+
---
242+
```
243+
244+
This way, the main content area will automatically expand to occupy the space originally used by the sidebar.
245+
:::
246+
234247
## outline
235248

236249
Whether to display the outline column on the right. By default, the `doc` page displays the outline column on the right. You can hide the outline column with the following config:
@@ -241,6 +254,19 @@ outline: false
241254
---
242255
```
243256

257+
:::tip
258+
`outline: false` only hides the outline column, but the space originally occupied by the outline column is still reserved. If you want the main content to occupy a wider screen space, you can use [`pageType: doc-wide`](#pagetype) with `outline: false`:
259+
260+
```yaml
261+
---
262+
pageType: doc-wide
263+
outline: false
264+
---
265+
```
266+
267+
This way, the main content area will automatically expand to occupy the space originally used by the outline column.
268+
:::
269+
244270
## footer
245271

246272
Whether to display the components at the bottom of the document (such as previous/next page). By default, the `doc` page will display the footer at the bottom. You can hide the footer with the following config:

website/docs/zh/api/config/config-frontmatter.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,19 @@ sidebar: false
231231
---
232232
```
233233

234+
:::tip 提示
235+
`sidebar: false` 仅隐藏侧边栏,但原本侧边栏占据的空间仍然保留。如果你想让正文内容占据更宽的屏幕空间,可以使用 [`pageType: doc-wide`](#pagetype) 配合 `sidebar: false`:
236+
237+
```yaml
238+
---
239+
pageType: doc-wide
240+
sidebar: false
241+
---
242+
```
243+
244+
这样正文内容区域会自动扩展,占据原本侧边栏的空间。
245+
:::
246+
234247
## outline
235248

236249
是否展示右侧的大纲栏。默认情况下,`doc` 页面会展示右侧的大纲栏。你可以通过下面的配置来隐藏大纲栏:
@@ -241,6 +254,19 @@ outline: false
241254
---
242255
```
243256

257+
:::tip 提示
258+
`outline: false` 仅隐藏大纲栏,但原本大纲栏占据的空间仍然保留。如果你想让正文内容占据更宽的屏幕空间,可以使用 [`pageType: doc-wide`](#pagetype) 配合 `outline: false`:
259+
260+
```yaml
261+
---
262+
pageType: doc-wide
263+
outline: false
264+
---
265+
```
266+
267+
这样正文内容区域会自动扩展,占据原本大纲栏的空间。
268+
:::
269+
244270
## footer
245271

246272
是否展示文档底部的组件(如上一页/下一页)。默认情况下,`doc` 页面会展示底部的 footer。你可以通过下面的配置来隐藏 footer:

0 commit comments

Comments
 (0)