Skip to content

Commit

Permalink
docs(config): add defineThemeConfig method description
Browse files Browse the repository at this point in the history
  • Loading branch information
KuangPF committed Aug 4, 2023
1 parent bebdfcf commit 1264421
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/docs/config/FAQ.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Badge>0.3.0+</Badge>

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:

Expand Down
2 changes: 1 addition & 1 deletion example/docs/config/FAQ.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ order: 3

> WIP
## 如何完全自定义首页
## 如何完全自定义首页 <Badge>0.3.0+</Badge>

`dumi-theme-antd` 首页默认是根据配置生成,在实际使用过程中难免会存在一些定制模块,`dumi-theme-antd`内部将首页模块单独抽离成了 `HomeBaseLayout` 内置组件,如果想在完全自定义首页的同时又想保留内置首页的布局,可在页面中引入使用。例如,新建页面:

Expand Down
13 changes: 13 additions & 0 deletions example/docs/config/base.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

<Alert showIcon> You can get better prompts through the `defineThemeConfig` method inside the theme package:</Alert>

```ts
import { defineConfig } from 'dumi';
import { defineThemeConfig } from 'dumi-theme-antd';

export default defineConfig({
themeConfig: defineThemeConfig({
title: 'Dumi Theme Ant Design'
})
});
```

## Basic Configuration

### github
Expand Down
13 changes: 13 additions & 0 deletions example/docs/config/base.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ order: 1

`dumi-theme-antd` 为了更好地适配 antd v5 官网主题风格,增加了一些特有字段,并将其置于 `dumi` 主题配置项 `themeConfig` 字段中,具体配置字段如下:

<Alert showIcon>可通过主题包内部 `defineThemeConfig` 方法获取更好的提示:</Alert>

```ts
import { defineConfig } from 'dumi';
import { defineThemeConfig } from 'dumi-theme-antd';

export default defineConfig({
themeConfig: defineThemeConfig({
title: 'Dumi Theme Ant Design'
})
});
```

## 基础配置项

### github
Expand Down
2 changes: 1 addition & 1 deletion example/docs/config/markdown.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Badge>0.3.0+</Badge>
## Hide the sidebar

To hide the sidebar just set the `sidebar` value to `false` in FrontMatter:

Expand Down
2 changes: 1 addition & 1 deletion example/docs/config/markdown.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ title: '概览'

同理,`type` 字段类型也支持对象格式,用于调整 `type` 显示顺序。

## 隐藏侧边栏 <Badge>0.3.0+</Badge>
## 隐藏侧边栏

隐藏侧边栏只需要在 FrontMatter 中设置 `sidebar` 值为 `false` 即可:

Expand Down

0 comments on commit 1264421

Please sign in to comment.