From 1264421f92d37fcf9c2a053b8671862f075c9b62 Mon Sep 17 00:00:00 2001
From: KuangPF <1633397286@qq.com>
Date: Fri, 4 Aug 2023 23:31:49 +0800
Subject: [PATCH] docs(config): add `defineThemeConfig` method description
---
example/docs/config/FAQ.en-US.md | 2 +-
example/docs/config/FAQ.zh-CN.md | 2 +-
example/docs/config/base.en-US.md | 13 +++++++++++++
example/docs/config/base.zh-CN.md | 13 +++++++++++++
example/docs/config/markdown.en-US.md | 2 +-
example/docs/config/markdown.zh-CN.md | 2 +-
6 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/example/docs/config/FAQ.en-US.md b/example/docs/config/FAQ.en-US.md
index f1e8e70..72b7269 100644
--- a/example/docs/config/FAQ.en-US.md
+++ b/example/docs/config/FAQ.en-US.md
@@ -9,7 +9,7 @@ Here are some dumi-theme-antd common questions and official answers for your ref
> WIP
-## How to fully customize the homepage
+## How to fully customize the homepage 0.3.0+
The home page of `dumi-theme-antd` is generated according to the configuration by default, and there will inevitably be some custom modules in the actual use process. `dumi-theme-antd` internally separates the home page module into a built-in component of `HomeBaseLayout`, if you want While fully customizing the homepage and wanting to retain the layout of the built-in homepage, it can be introduced and used in the page. For example, to create a new page:
diff --git a/example/docs/config/FAQ.zh-CN.md b/example/docs/config/FAQ.zh-CN.md
index 59a31b4..1f379d2 100644
--- a/example/docs/config/FAQ.zh-CN.md
+++ b/example/docs/config/FAQ.zh-CN.md
@@ -9,7 +9,7 @@ order: 3
> WIP
-## 如何完全自定义首页
+## 如何完全自定义首页 0.3.0+
`dumi-theme-antd` 首页默认是根据配置生成,在实际使用过程中难免会存在一些定制模块,`dumi-theme-antd`内部将首页模块单独抽离成了 `HomeBaseLayout` 内置组件,如果想在完全自定义首页的同时又想保留内置首页的布局,可在页面中引入使用。例如,新建页面:
diff --git a/example/docs/config/base.en-US.md b/example/docs/config/base.en-US.md
index 4225a2a..f5cd350 100644
--- a/example/docs/config/base.en-US.md
+++ b/example/docs/config/base.en-US.md
@@ -7,6 +7,19 @@ order: 1
`dumi-theme-antd` In order to better adapt to the theme style of the antd v5 official website, some unique fields have been added and placed in the `themeConfig` field of the `dumi` theme configuration item. The specific configuration fields are as follows:
+ You can get better prompts through the `defineThemeConfig` method inside the theme package:
+
+```ts
+import { defineConfig } from 'dumi';
+import { defineThemeConfig } from 'dumi-theme-antd';
+
+export default defineConfig({
+ themeConfig: defineThemeConfig({
+ title: 'Dumi Theme Ant Design'
+ })
+});
+```
+
## Basic Configuration
### github
diff --git a/example/docs/config/base.zh-CN.md b/example/docs/config/base.zh-CN.md
index 60badc9..c93547d 100644
--- a/example/docs/config/base.zh-CN.md
+++ b/example/docs/config/base.zh-CN.md
@@ -7,6 +7,19 @@ order: 1
`dumi-theme-antd` 为了更好地适配 antd v5 官网主题风格,增加了一些特有字段,并将其置于 `dumi` 主题配置项 `themeConfig` 字段中,具体配置字段如下:
+可通过主题包内部 `defineThemeConfig` 方法获取更好的提示:
+
+```ts
+import { defineConfig } from 'dumi';
+import { defineThemeConfig } from 'dumi-theme-antd';
+
+export default defineConfig({
+ themeConfig: defineThemeConfig({
+ title: 'Dumi Theme Ant Design'
+ })
+});
+```
+
## 基础配置项
### github
diff --git a/example/docs/config/markdown.en-US.md b/example/docs/config/markdown.en-US.md
index 4e6b952..68ea6ec 100644
--- a/example/docs/config/markdown.en-US.md
+++ b/example/docs/config/markdown.en-US.md
@@ -100,7 +100,7 @@ title: '概览'
Similarly, `type` field type also supports object format, which is used to adjust the display order of `type`.
-## Hide the sidebar 0.3.0+
+## Hide the sidebar
To hide the sidebar just set the `sidebar` value to `false` in FrontMatter:
diff --git a/example/docs/config/markdown.zh-CN.md b/example/docs/config/markdown.zh-CN.md
index 2c36b64..4a6ccfd 100644
--- a/example/docs/config/markdown.zh-CN.md
+++ b/example/docs/config/markdown.zh-CN.md
@@ -100,7 +100,7 @@ title: '概览'
同理,`type` 字段类型也支持对象格式,用于调整 `type` 显示顺序。
-## 隐藏侧边栏 0.3.0+
+## 隐藏侧边栏
隐藏侧边栏只需要在 FrontMatter 中设置 `sidebar` 值为 `false` 即可: