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