forked from umijs/dumi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: improve guide and add env config (umijs#1697)
* docs: add version select * docs: describe conventional files * docs: add env config doc * docs: improve i18n doc * docs: improve page tab doc * docs: improve write demo doc * docs: improve 2-level nav preview image
- Loading branch information
1 parent
494dcfa
commit ce91874
Showing
14 changed files
with
181 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { ReactComponent as IconDown } from '@ant-design/icons-svg/inline-svg/outlined/down.svg'; | ||
import React, { type FC } from 'react'; | ||
|
||
const HeaderExtra: FC = () => { | ||
return ( | ||
<div | ||
className="dumi-default-lang-select" | ||
style={{ | ||
borderInlineStart: '1px solid #d0d5d8', | ||
marginInlineStart: 15, | ||
paddingInlineStart: 5, | ||
}} | ||
> | ||
<select | ||
style={{ paddingTop: 1, paddingBottom: 1 }} | ||
value={process.env.DUMI_VERSION} | ||
onChange={(e) => { | ||
if (e.target.value !== process.env.DUMI_VERSION) { | ||
window.open('https://v1.d.umijs.org/', '_blank'); | ||
} | ||
}} | ||
> | ||
<option value={process.env.DUMI_VERSION}> | ||
{process.env.DUMI_VERSION} | ||
</option> | ||
<option value="1.x">1.x</option> | ||
</select> | ||
<IconDown /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default HeaderExtra; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# 环境变量配置 | ||
|
||
<embed src="../.upstream/env-config.md"></embed> | ||
|
||
### DUMI_CACHE | ||
|
||
默认会将框架的高消耗执行结果(例如编译 Markdown 文件)持久化存储到本地,该结果会在二次执行时被选择性复用以提升框架运行速度,设置为 `none` 时可以禁用该行为,通常用于开发自定义 Markdown 插件的调试环节。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Tab 示例 | ||
--- | ||
|
||
这里是页面 Tab 的示例,内容在独立的 Markdown 中维护。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters