Skip to content

Commit

Permalink
Merge branch 'master' into wuxh/feat-1463
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 committed Dec 15, 2023
2 parents ec9ce09 + 4246aff commit b2489ac
Show file tree
Hide file tree
Showing 51 changed files with 1,334 additions and 834 deletions.
3 changes: 3 additions & 0 deletions .dumi/theme/slots/HeaderExtra/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const HeaderExtra: FC = () => {
window.open('https://v1.d.umijs.org/', '_blank');
}
}}
onClick={(e) => {
e.stopPropagation();
}}
>
<option value={process.env.DUMI_VERSION}>
{process.env.DUMI_VERSION}
Expand Down
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

94 changes: 94 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Bug Report
description: File a bug report / 报告错误
title: 'bug: '
labels: ['unconfirmed']
body:
- type: markdown
attributes:
value: |
The issue list is reserved exclusively for bug reports and feature requests. That means we do not accept usage questions, for usage questions, please use the following resources:
- Read the [guide documentation](https://d.umijs.org/guide) or search documentation via issue keywords
- Make sure you have search your question in [FAQ](https://d.umijs.org/guide/faq) and [release notes](https://github.com/umijs/dumi/releases)
- Look for ask questions in [Discussions](https://github.com/umijs/dumi/discussions)
Also try to search for your issue - it may have already been answered or even fixed in the development branch. However, if you find that an old, closed issue still persists in the latest version, you should open a new issue using the form below instead of commenting on the old issue.
---
dumi 的 issue 列表只接受 Bug 报告或是新功能请求 (Feature Request)。这意味着我们不接受用法问题(How to 类问题),对于使用中遇到的问题,请使用以下资源:
- 仔细阅读 [指南文档](https://d.umijs.org/guide) 或使用官网搜索问题关键字
- 提问前确保你在 [FAQ](https://d.umijs.org/guide/faq) 和 [发布日志](https://github.com/umijs/dumi/releases) 中搜索过
- 在 [Discussions](https://github.com/umijs/dumi/discussions) 搜索和提问
最后,在开 issue 前,可以先搜索一下以往的旧 issue - 你遇到的问题可能已经有人提了,也可能已经在最新版本中被修正。注意:如果你发现一个已经关闭的旧 issue 在最新版本中仍然存在,请不要在旧 issue 下面留言,而应该用下面的表单开一个新的 issue。
- type: input
id: version
attributes:
label: Version
description: dumi version you now use
placeholder: ex. 2.2.12
validations:
required: true

- type: input
id: os
attributes:
label: OS Version
description: Operation system version you now use
placeholder: ex. macOS 14.0.0
validations:
required: true

- type: input
id: node
attributes:
label: Node.js Version
description: Node.js version you now use
placeholder: ex. 18.0.0
validations:
required: true

- type: input
id: browser
attributes:
label: Browser Version
description: Browser version you now use
placeholder: ex. Firefox 118.0.0
validations:
required: true

- type: input
id: reproduction
attributes:
label: Link to minimal reproduction
description: The minimal repository link to reproduce this issue
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to reproduce
validations:
required: true

- type: textarea
id: expected
attributes:
label: What is expected?
validations:
required: true

- type: textarea
id: happened
attributes:
label: What is actually happening?
validations:
required: true

- type: textarea
id: additional
attributes:
label: Any additional comments? (optional)
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Github Discussions
url: https://github.com/umijs/dumi/discussions
about: Ask or answer usage questions / 交流使用问题
18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Feature Request
description: Request a new feature / 提出新功能请求
title: 'feat: '
labels: ['enhancement']
body:
- type: markdown
attributes:
value: |
The issue list is reserved exclusively for bug reports and feature requests. That means we do not accept usage questions, for usage questions, please use the following resources:
- Read the [guide documentation](https://d.umijs.org/guide) or search documentation via issue keywords
- Make sure you have search your question in [FAQ](https://d.umijs.org/guide/faq) and [release notes](https://github.com/umijs/dumi/releases)
- Look for ask questions in [Discussions](https://github.com/umijs/dumi/discussions)
Also try to search for your issue - it may have already been answered or even fixed in the development branch. However, if you find that an old, closed issue still persists in the latest version, you should open a new issue using the form below instead of commenting on the old issue.
---
dumi 的 issue 列表只接受 Bug 报告或是新功能请求 (Feature Request)。这意味着我们不接受用法问题(How to 类问题),对于使用中遇到的问题,请使用以下资源:
- 仔细阅读 [指南文档](https://d.umijs.org/guide) 或使用官网搜索问题关键字
- 提问前确保你在 [FAQ](https://d.umijs.org/guide/faq) 和 [发布日志](https://github.com/umijs/dumi/releases) 中搜索过
- 在 [Discussions](https://github.com/umijs/dumi/discussions) 搜索和提问
最后,在开 issue 前,可以先搜索一下以往的旧 issue - 你遇到的问题可能已经有人提了,也可能已经在最新版本中被修正。注意:如果你发现一个已经关闭的旧 issue 在最新版本中仍然存在,请不要在旧 issue 下面留言,而应该用下面的表单开一个新的 issue。
- type: textarea
id: description
attributes:
label: What problem does this feature solve?
validations:
required: true

- type: textarea
id: solution
attributes:
label: Possible Solution (optional)
9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/config/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ group: 框架配置

## 配置项

### modifyCodeSandBoxData
### modifyCodeSandboxData

修改在 CodeSandbox 中打开 demo 的数据,比如修改依赖、增加文件等。

```js
export function modifyCodeSandBoxData(memo, props) {
export function modifyCodeSandboxData(memo, props) {
// 根据需要修改 memo 并返回新值
return memo;
}
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ yarn add gh-pages -D
}
```

> 同样的,如果是 react 文档,使用 `gh-pages -d docs-dist`命令即可。
编译生成 `dist` 目录

```bash
Expand Down Expand Up @@ -156,6 +158,8 @@ jobs:
publish_dir: ./dist
```
> 如果 actions 部署时遇到 403 错误,可以尝试使用 [Deploy Token](https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-set-ssh-private-key-deploy_key)
## dumi 如何支持对 Swift、C#、Kotlin 等语言的语法高亮?
dumi 语法高亮使用的 [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer) ,是一款基于 [PrismJS](https://github.com/PrismJS/prism) 实现的 React 组件。 `PrismJS` 支持的语言种类很多,但 `prism-react-renderer` 在实现的时候对部分语言进行了移除,其具体原因可以查看 [Adding Out of the Box Languages](https://github.com/FormidableLabs/prism-react-renderer/issues/53#issuecomment-546653848)。
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ dumi,中文发音**嘟米**,是一款为组件开发场景而生的静态站
或加入讨论群:

<div>
<img data-type="dingtalk" src="https://gw.alipayobjects.com/zos/bmw-prod/7362dab4-374e-42c6-9d52-85fd4b5e357b/lbesxxl3_w1004_h1346.jpeg" width="300" />
<img data-type="dingtalk" src="https://mdn.alipayobjects.com/huamei_i7qs1c/afts/img/A*T94jRZmW1fgAAAAAAAAAAAAADs-oAQ" width="300" />
</div>
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ features:
请访问 [GitHub](https://github.com/umijs/dumi) 或加入讨论群:

<div>
<img data-type="dingtalk" src="https://gw.alipayobjects.com/zos/bmw-prod/7362dab4-374e-42c6-9d52-85fd4b5e357b/lbesxxl3_w1004_h1346.jpeg" width="300" />
<img data-type="dingtalk" src="https://mdn.alipayobjects.com/huamei_i7qs1c/afts/img/A*T94jRZmW1fgAAAAAAAAAAAAADs-oAQ" width="300" />
</div>
19 changes: 19 additions & 0 deletions docs/plugin/market.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: 插件市场
group: 介绍
order: 4
toc: null
---

<!-- 此处你将看到超棒的插件合集。<= 超过 10 个插件俺就取消注释!-->

阅读更多关于 [如何使用插件](./index.md#配置),或 [如何编写属于你自己的插件](./new.md) 并与社区分享!

## 社区插件

- [**color-chunk**](https://github.com/Wxh16144/dumi-plugin-color-chunk#readme): 美化内联代码颜色块儿 \`#f00\`
- TBD: [提交我的插件](https://github.com/umijs/dumi/edit/master/docs/plugin/market.md)

## 更多插件

查找 [NPM 上所有可用的插件](https://www.npmjs.com/search?q=keywords%3Adumi-plugin)
4 changes: 4 additions & 0 deletions docs/theme/market.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,7 @@ toc: null
</ul>
</ThemeCases>

## 更多主题

查找 [NPM 上所有可用的主题](https://www.npmjs.com/search?q=keywords%3Adumi-theme)
2 changes: 2 additions & 0 deletions examples/normal/src/Foo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const Foo: FC<{
children: React.ReactNode;
onConfirm: (output: { children: any[] }) => void;
dom: HTMLElement;
// eslint-disable-next-line @typescript-eslint/ban-types
func: Function;
}> = (props) => {
return <>{props.title}</>;
};
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dumi",
"version": "2.2.6",
"version": "2.2.16",
"description": "📖 Documentation Generator of React Component",
"keywords": [
"generator",
Expand Down Expand Up @@ -82,8 +82,9 @@
"@swc/core": "1.3.72",
"@types/hast": "^2.3.5",
"@types/mdast": "^3.0.12",
"@umijs/bundler-utils": "^4.0.73",
"@umijs/core": "^4.0.73",
"@umijs/bundler-utils": "^4.0.84",
"@umijs/core": "^4.0.84",
"@umijs/utils": "^4.0.84",
"animated-scroll-to": "^2.3.0",
"classnames": "2.3.2",
"codesandbox": "^2.2.3",
Expand Down Expand Up @@ -131,7 +132,7 @@
"remark-rehype": "^10.1.0",
"sass": "^1.64.1",
"sitemap": "^7.1.1",
"umi": "^4.0.73",
"umi": "^4.0.84",
"unified": "^10.1.2",
"unist-util-visit": "^4.1.2",
"unist-util-visit-parents": "^5.1.3",
Expand All @@ -151,7 +152,7 @@
"@types/pluralize": "^0.0.30",
"@types/react": "^18.2.17",
"@types/react-copy-to-clipboard": "^5.0.4",
"@umijs/lint": "^4.0.73",
"@umijs/lint": "^4.0.84",
"@umijs/plugins": "4.0.32",
"dumi-theme-mobile": "workspace:*",
"eslint": "^8.46.0",
Expand Down
Loading

0 comments on commit b2489ac

Please sign in to comment.