mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
docs: update docs
This commit is contained in:
parent
2219f2019e
commit
e35e3d99ef
@ -20,6 +20,12 @@ __options__ : `PlumeThemeOptions`
|
||||
|
||||
查看 [主题配置](/config/basic/) 了解更多。
|
||||
|
||||
## `defineThemeConfig(options)`
|
||||
|
||||
主题配置帮助函数,用于在单独的 `plume.config.ts` 中使用。
|
||||
|
||||
查看 [主题配置文件](../config/配置说明.md#主题配置文件) 了解更多。
|
||||
|
||||
## `defineNavbarConfig(options)`
|
||||
|
||||
主题导航栏配置函数。
|
||||
|
||||
@ -8,12 +8,12 @@ permalink: /guide/layout-slots/
|
||||
|
||||
## 概述
|
||||
|
||||
主题通过 `<Layout />` 提供了 丰富的 布局插槽,可以通过这些插槽,在 页面 的不同位置注入内容。
|
||||
主题通过 `<Layout />` 和 `<NotFound />` 提供了 丰富的 布局插槽,可以通过这些插槽,在 页面 的不同位置注入内容。
|
||||
以便用户可以个性化的使用主题。
|
||||
|
||||
## 使用
|
||||
|
||||
首先,需要创建一个 客户端配置文件: `.vuepress/client.ts`:
|
||||
以 `<Layout />` 为例,首先,需要创建一个 客户端配置文件: `.vuepress/client.ts`:
|
||||
|
||||
```ts
|
||||
import { defineClientConfig } from 'vuepress/client'
|
||||
@ -69,7 +69,7 @@ export default defineClientConfig({
|
||||
|
||||
## 插槽
|
||||
|
||||
主题支持以下插槽:
|
||||
### `<Layout />` 插槽
|
||||
|
||||
- 当 `pageLayout: doc` 时:
|
||||
|
||||
@ -115,13 +115,24 @@ export default defineClientConfig({
|
||||
- `blog-archives-before`
|
||||
- `blog-archives-after`
|
||||
|
||||
- 总是启用:
|
||||
- 在 博客分类页 中:
|
||||
|
||||
- `layout-top`
|
||||
- `layout-bottom`
|
||||
- `nav-bar-title-before`
|
||||
- `nav-bar-title-after`
|
||||
- `nav-bar-content-before`
|
||||
- `nav-bar-content-after`
|
||||
- `nav-screen-content-before`
|
||||
- `nav-screen-content-after`
|
||||
- `blog-categories-before`
|
||||
- `blog-categories-after`
|
||||
|
||||
### `<NotFound />` 插槽
|
||||
|
||||
- `not-found`
|
||||
|
||||
### 通用插槽
|
||||
|
||||
以下插槽在 `<Layout />` 和 `<NotFound />` 中都支持:
|
||||
|
||||
- `layout-top`
|
||||
- `layout-bottom`
|
||||
- `nav-bar-title-before`
|
||||
- `nav-bar-title-after`
|
||||
- `nav-bar-content-before`
|
||||
- `nav-bar-content-after`
|
||||
- `nav-screen-content-before`
|
||||
- `nav-screen-content-after`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user