docs: update

pull/4532/head
yuyinws 8 months ago
parent 8a9fcc3fdd
commit 9549edb49e
No known key found for this signature in database
GPG Key ID: 066DDFA8B76EA147

@ -20,6 +20,9 @@ export interface Footer {
// The actual copyright text. // The actual copyright text.
copyright?: string copyright?: string
// Whether to show the footer when the sidebar is visible.
showWithSidebar?: boolean
} }
``` ```
@ -40,7 +43,7 @@ export default {
Only inline elements can be used in `message` and `copyright` as they are rendered inside a `<p>` element. If you want to add block elements, consider using [`layout-bottom`](../guide/extending-default-theme#layout-slots) slot instead. Only inline elements can be used in `message` and `copyright` as they are rendered inside a `<p>` element. If you want to add block elements, consider using [`layout-bottom`](../guide/extending-default-theme#layout-slots) slot instead.
::: :::
Note that footer will not be displayed when the [SideBar](./default-theme-sidebar) is visible. By default, the footer will not be displayed when the [SideBar](./default-theme-sidebar) is visible. But you can change this behavior by setting `showWithSidebar` to `true` in the configuration.
## Frontmatter Config ## Frontmatter Config

@ -20,6 +20,9 @@ export interface Footer {
// 实际的版权文本 // 实际的版权文本
copyright?: string copyright?: string
// 是否在侧边栏可见时显示页脚
showWithSidebar?: boolean
} }
``` ```
@ -40,7 +43,7 @@ export default {
只有内联元素可以在 `message``copyright` 中使用,因为它们渲染在 `<p>` 元素中。如果想添加块元素,请考虑使用 [`layout-bottom`](../guide/extending-default-theme#layout-slots) 插槽。 只有内联元素可以在 `message``copyright` 中使用,因为它们渲染在 `<p>` 元素中。如果想添加块元素,请考虑使用 [`layout-bottom`](../guide/extending-default-theme#layout-slots) 插槽。
::: :::
请注意,当[侧边栏](./default-theme-sidebar)可见时,不会显示页脚。 默认情况下,当[侧边栏](./default-theme-sidebar)可见时,不会显示页脚。但可以通过在配置中设置 `showWithSidebar` 来更改此行为。
## frontmatter 配置 {#frontmatter-config} ## frontmatter 配置 {#frontmatter-config}

Loading…
Cancel
Save