Skip to content

Commit 0ce529a

Browse files
committed
docs: update abbrlink
1 parent a2d4f75 commit 0ce529a

File tree

3 files changed

+48
-7
lines changed

3 files changed

+48
-7
lines changed

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ abbrlink: s31w9gd1
3232
* 开箱即用: 通过指定目录或文档, 一键生成文档、博客站点, 无需关心站点环境配置信息。
3333
* 性能: 通过`预渲染``懒加载`大幅提升站点加载速度。
3434
* 基于 mdx: 支持在 markdown 中`书写 React 组件`、数学公式等。
35-
* 搜索引擎优化: `支持 SEO`, 让文档更易被搜索。相关文档: [SEO 在 SPA 站点中的实践](https://github.com/MuYunyun/blog/issues/84)
36-
* 个性化: 支持[自定义主题](http://muyunyun.cn/create-react-doc/%E4%B8%BB%E9%A2%98/%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%BB%E9%A2%98)
35+
* 搜索引擎优化:
36+
* 支持 SEO, 让文档更易被搜索。
37+
* 支持短链,以让链接持久化。
38+
* 个性化: 支持[自定义主题](https://muyunyun.cn/create-react-doc/9f41fc98)
3739
* 工作流: 集成 Github action, 支持自动化打包、发布站点。
3840

39-
> [快速上手](http://muyunyun.cn/create-react-doc/%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B)
41+
> [快速上手](https://muyunyun.cn/create-react-doc/290a4219)
4042
4143
## 主题
4244

@@ -52,9 +54,9 @@ create-react-doc 提供了官方默认主题 [crd-seed](https://github.com/MuYun
5254
* [blog](https://github.com/MuYunyun/blog), [站点](http://muyunyun.cn/blog)
5355
* ![](http://with.muyunyun.cn/ec330b8ac2175c828be41f446f9f9619.jpg)
5456
* ![](http://with.muyunyun.cn/2e7440e4256debda2d73a4e6392c7146.jpg-300)
55-
* [diana](https://github.com/MuYunyun/diana), [站点](https://muyunyun.cn/diana/)
57+
* [diana](https://github.com/MuYunyun/diana)
5658

57-
如果您想定制化或者分享个人主题, 可以参考[自定义主题](http://muyunyun.cn/create-react-doc/自定义主题)章节
59+
如果您想定制化或者分享个人主题, 可以参考[自定义主题](https://muyunyun.cn/create-react-doc/9f41fc98)
5860

5961
## 快速上手
6062

@@ -90,7 +92,7 @@ yarn create react-doc doc
9092

9193
## 站点发布
9294

93-
[快速上手](http://muyunyun.cn/create-react-doc/快速上手) 一节中介绍了如何快速搭建站点, 本节将介绍如何将搭建好的站点打包、发布到 gh-pages。
95+
[快速上手](https://muyunyun.cn/create-react-doc/290a4219) 一节中介绍了如何快速搭建站点, 本节将介绍如何将搭建好的站点打包、发布到 gh-pages。
9496

9597
### 自动打包发布到 gh-pages (推荐)
9698

@@ -109,4 +111,13 @@ git remote add origin https://github.com/用户或组织名/项目名.git
109111
git push -u origin main
110112
```
111113

112-
> 更多内容可以访问 [站点发布](http://muyunyun.cn/create-react-doc/站点发布)[高阶用法](http://muyunyun.cn/create-react-doc/高阶用法)[其它工具](http://muyunyun.cn/create-react-doc/其它工具) 等章节。
114+
## 更多内容
115+
116+
* [站点发布](http://muyunyun.cn/create-react-doc/ude9296y)
117+
* [高阶用法](http://muyunyun.cn/create-react-doc/9v9ug9h8)
118+
* [其它工具](http://muyunyun.cn/create-react-doc/292h2c5k)
119+
* [Front-matter](http://muyunyun.cn/create-react-doc/49g6b239)
120+
121+
## 扩展阅读
122+
123+
* [SEO 在 SPA 站点中的实践](https://github.com/MuYunyun/blog/issues/84)

docs/Front-matter.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,25 @@ abbrlink: 290a4219
1717
| 参数 | 描述 | 默认值 |
1818
| :------- | :-------------------------------------------------------------- | :----- |
1919
| abbrlink | 短链。用于指定页面路由展示为指定短链,使用短链有助于 SEO 搜索。 | |
20+
21+
## 链接持久化
22+
23+
如果存在以下场景需求,可以考虑使用短链作为 URL 展示以进行优化。
24+
25+
* 需要链接持久化以更好地 SEO。
26+
* URL 链接中存在中文会被转码展示。
27+
* 经常调整文档的路径与文件名。
28+
29+
### 如何使用短链
30+
31+
`config.yml` 增加配置 `abbrlink: true`
32+
33+
```diff
34+
+ abbrlink: true
35+
```
36+
37+
随后在控制台执行 `react-doc generate` 即可给 menu 配置属性中的所有文章目录文件加上短链资源。
38+
39+
```bash
40+
react-doc generate // 一键给所有文章加上短链
41+
```

docs/更新日志.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ abbrlink: 179nqpxt
66

77
`create-react-doc` 严格遵循 [Semantic Versioning 2.0.0](http://semver.org/lang/zh-CN/) 语义化版本规范。
88

9+
### 1.5.0
10+
11+
`2021-10-12`
12+
13+
- **Feature**
14+
15+
- 🚀 支持 react-doc generate 命令,给 md 文件自动补全短链。[issue](https://github.com/MuYunyun/create-react-doc/issues/87)[mr](https://github.com/MuYunyun/create-react-doc/pull/194)
16+
917
### 1.4.0
1018

1119
`2021-10-08`

0 commit comments

Comments
 (0)