File tree 5 files changed +6
-10
lines changed
5 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ abbrlink: 290a4219
20
20
21
21
## 链接持久化
22
22
23
- 如果存在以下场景需求,可以考虑使用短链作为 URL 展示以进行优化 。
23
+ 在以下场景需求场合中,可以展示短链以优化 URL 的显示 。
24
24
25
- * 需要链接持久化以更好地 SEO。
25
+ * SEO 场景下需要链接持久化 。
26
26
* URL 链接中存在中文会被转码展示。
27
- * 经常调整文档的路径与文件名 。
27
+ * 文档的路径与文件名经常变更 。
28
28
29
29
### 如何使用短链
30
30
@@ -34,7 +34,7 @@ abbrlink: 290a4219
34
34
+ abbrlink: true
35
35
```
36
36
37
- 随后在控制台执行 ` react-doc generate ` 即可给 menu 配置属性中的所有文章目录文件加上短链资源。
37
+ 做好上述配置后,接着在控制台执行 ` react-doc generate ` 即可给 menu 配置属性中的所有文章目录文件加上短链资源。
38
38
39
39
``` bash
40
40
react-doc generate // 一键给所有文章加上短链
Original file line number Diff line number Diff line change 1
1
<!--
2
2
abbrlink: slkczvi1
3
- title: 数学公式
4
- date: 2019-05-12 13:23:44
5
3
-->
6
4
7
5
## 数学公式
Original file line number Diff line number Diff line change @@ -210,7 +210,6 @@ function BasicLayout({
210
210
211
211
const carryRepoInProd = ifProd && repo
212
212
const renderContent = ( ) => {
213
- console . log ( 'routeData' , routeData )
214
213
const defaultPath = ( routeData . find ( data => data . path === '/README' )
215
214
&& routeData . find ( data => data . path === '/README' ) . mdconf
216
215
&& routeData . find ( data => data . path === '/README' ) . mdconf . abbrlink ) || 'README'
Original file line number Diff line number Diff line change @@ -2,14 +2,13 @@ const fs = require('fs')
2
2
const yaml = require ( 'js-yaml' )
3
3
const { resolveApp, resolveTool } = require ( './path' )
4
4
5
+ /* avoid reference loop, so use resolveApp('config.yml') instead of refrence from paths. */
5
6
const docsConfig = resolveApp ( 'config.yml' )
6
7
7
8
/**
8
9
* get docs config, see https://github.com/nodeca/js-yaml/blob/2d1fbed8f3a76ff93cccb9a8a418b4c4a482d3d9/lib/js-yaml/loader.js#L1590-L1592
9
10
*/
10
11
const getDocsConfig = ( ) => {
11
- /* avoid reference loop, so use resolveApp('config.yml') instead of refrence from paths. */
12
- // const docsConfig = resolveApp('config.yml')
13
12
if ( ! fs . existsSync ( docsConfig ) ) {
14
13
return null
15
14
}
Original file line number Diff line number Diff line change @@ -25,4 +25,4 @@ $ react-doc generate // 用于自动生成 Front-matter 中相关字段信息
25
25
26
26
# 调试
27
27
28
- 进入此包目录 , 执行 yarn link, 即可在全局使用 react-doc xxx 命令。
28
+ 进入该目录 , 执行 ` yarn link ` , 即可在全局使用 react-doc xxx 命令。
You can’t perform that action at this time.
0 commit comments