Skip to content

Commit 28538ad

Browse files
committed
feat: run short link in dev
1 parent 954f7cd commit 28538ad

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

docs/主题/自定义主题.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<!--
2+
title: 自定义主题
3+
abbrlink: 9f41fc98
4+
date: 2019-05-12 13:23:44
5+
-->
6+
17
## 使用自定义主题
28

39
切换主题非常简单, 只需要将根目录文件 `config.yml` 中的 `theme` 更改为您想使用的主题即可。

docs/主题/默认主题.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<!--
2+
title: 默认主题
3+
abbrlink: f55182c5
4+
date: 2019-05-12 13:23:44
5+
-->
6+
17
## 默认主题
28

39
create-react-doc 的默认主题为 [crd-seed](https://github.com/MuYunyun/create-react-doc/tree/main/packages/crd-seed)。该主题有以下特性:

packages/crd-seed/component/Menu/MenuItem.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ function MenuItem({
1616
}
1717

1818
const renderMenuItem = () => {
19-
if (selectedKey === '/290a4219') {
20-
debugger
21-
}
2219
return (
2320
<li
2421
className={cx(styles['menu-item'], styles[`menu-${theme}`], {

packages/crd-seed/layout/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ function BasicLayout({
4343

4444
useEffect(() => {
4545
const newPathName = location.pathname
46-
setSelectedKey(`${newPathName}.md`)
46+
// setSelectedKey(`${newPathName}.md`)
47+
setSelectedKey(newPathName)
4748
}, location)
4849

4950
const scrollToTop = () => {
@@ -59,7 +60,6 @@ function BasicLayout({
5960
const { mdconf, routePath } = item || {}
6061
const { abbrlink } = mdconf || {}
6162
const path = abbrlink ? `/${abbrlink}` : routePath
62-
console.log('item123', item)
6363
// item.path carrys .md here.
6464
return item.children && item.children.length > 0 ? (
6565
<SubMenu key={index} keyValue={item.path} title={item.name} icon={<Icon type="folder" size={16} />}>

0 commit comments

Comments
 (0)