Skip to content

Commit

Permalink
docs: support seo
Browse files Browse the repository at this point in the history
  • Loading branch information
MuYunyun committed Mar 6, 2021
1 parent cd9e07e commit d061c77
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 32 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* 建站理念: 文件即站点 (Files as a Site)。
* 开箱即用: 通过指定目录或文档, 一键生成文档、博客站点, 无需关心站点环境配置信息。
* 性能: 通过预渲染、懒加载大幅提升站点加载速度。
* SEO: 支持 SEO, 让文档更易被搜索。
* 搜索引擎优化: 支持 SEO, 让文档更易被搜索。
* 个性化: 支持[自定义主题](http://muyunyun.cn/create-react-doc/%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%BB%E9%A2%98)
* 工作流: 集成 Github action, 支持自动化打包、发布站点。

Expand All @@ -43,12 +43,12 @@ create-react-doc 提供了官方默认主题 [crd-seed](https://github.com/MuYun
* 文档支持内嵌 codepen、codesandbox。
* GitHub 联动。

使用该主题搭建的站点有:
使用该主题搭建的项目有:

* [blog](http://muyunyun.cn/blog)
* [blog](https://github.com/MuYunyun/blog), [站点](http://muyunyun.cn/blog)
* ![](http://with.muyunyun.cn/ec330b8ac2175c828be41f446f9f9619.jpg)
* ![](http://with.muyunyun.cn/2e7440e4256debda2d73a4e6392c7146.jpg-300)
* [diana](https://muyunyun.cn/diana/)
* [diana](https://github.com/MuYunyun/diana), [站点](https://muyunyun.cn/diana/)

如果您想定制化或者分享个人主题, 可以参考[自定义主题](http://muyunyun.cn/create-react-doc/%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%BB%E9%A2%98)章节。

Expand Down Expand Up @@ -86,7 +86,7 @@ yarn create react-doc doc

## 站点发布

[快速上手](http://muyunyun.cn/create-react-doc/%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B) 一节中介绍了如何快速搭建站点, 本节将介绍如何将搭建好的站点打包、发布到 gh-pages。
[快速上手](http://muyunyun.cn/create-react-doc/快速上手) 一节中介绍了如何快速搭建站点, 本节将介绍如何将搭建好的站点打包、发布到 gh-pages。

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

Expand All @@ -105,4 +105,4 @@ git remote add origin https://github.com/用户或组织名/项目名.git
git push -u origin main
```

> 更多内容可以访问 [站点发布](http://muyunyun.cn/create-react-doc/%E7%AB%99%E7%82%B9%E5%8F%91%E5%B8%83)[高阶用法](http://muyunyun.cn/create-react-doc/%E9%AB%98%E9%98%B6%E7%94%A8%E6%B3%95)[其它工具](http://muyunyun.cn/create-react-doc/%E5%85%B6%E5%AE%83%E5%B7%A5%E5%85%B7) 等章节。
> 更多内容可以访问 [站点发布](http://muyunyun.cn/create-react-doc/站点发布)[高阶用法](http://muyunyun.cn/create-react-doc/高阶用法)[其它工具](http://muyunyun.cn/create-react-doc/其它工具) 等章节。
3 changes: 2 additions & 1 deletion docs/更新日志.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

- **Feature**

- 🚀 新增 crd-generator-sitemap 包。
- 🚀 新增 crd-generator-sitemap 包, 用于生成 sitemap
- 🚀 配置文件中新增 domain 字段用于生成 sitemap。

### 1.0.0

- **Feature**
Expand Down
32 changes: 17 additions & 15 deletions docs/默认主题.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,33 @@ create-react-doc 的默认主题为 [crd-seed](https://github.com/MuYunyun/creat
* 文档支持内嵌 codepen、codesandbox。
* GitHub 联动。

使用该主题搭建的站点有:
使用该主题搭建的项目有:

* [blog](http://muyunyun.cn/blog)
* [blog](https://github.com/MuYunyun/blog), [站点](http://muyunyun.cn/blog)
* ![](http://with.muyunyun.cn/ec330b8ac2175c828be41f446f9f9619.jpg)
* ![](http://with.muyunyun.cn/2e7440e4256debda2d73a4e6392c7146.jpg-300)
* [diana](https://muyunyun.cn/diana/)
* [diana](https://github.com/MuYunyun/diana), [站点](https://muyunyun.cn/diana/)

> 如果您的产品从中受益,欢迎<a href="https://github.com/MuYunyun/create-react-doc/issues/new" target="_blank">留言补充</a>
> 如果您有其它的改进优化想法, 欢迎<a href="https://github.com/MuYunyun/create-react-doc/issues/new" target="_blank">留言补充</a>
## config.yml

[config.yml](https://github.com/MuYunyun/create-react-doc/blob/main/packages/templates/default/_config.yml) 文件是配置站点主题功能的地方。

它支持配置的属性如下:

| 属性名 | 作用 | 类型 | 默认 |
| :------------: | :-------------------------------: | :---------: | :------: |
| title | 站点名 | string | |
| menu | 作为站点菜单的文件/文件夹路径 | string[] | |
| menuOpenKeys | 默认展开菜单的文件夹路径 | string | |
| user | Github 用户名 | string | |
| repo | Github 项目名 | string | |
| language | 站点语言 | en \| zh-cn | en |
| github-ribbons | 是否在右上角显示 github 丝带 | boolean | false |
| theme | 使用主题 | string | crd-seed |
| devTheme | 开发自定义主题时, 需设置其为 true | string | ./index |
| 属性名 | 作用 | 类型 | 默认 |
| :------------: | :----------------------------------: | :------------------: | :------: |
| title | 站点名 | string | |
| menu | 作为站点菜单的文件/文件夹路径 | string[] | |
| menuOpenKeys | 默认展开菜单的文件夹路径 | string | |
| user | Github 用户名 | string | |
| repo | Github 项目名 | string | |
| language | 站点语言 | en \| zh-cn | en |
| github-ribbons | 是否在右上角显示 github 丝带 | boolean | false |
| theme | 使用主题 | string | crd-seed |
| devTheme | 开发自定义主题时, 需设置其为 true | string | ./index |
| seo | 是否开启 SEO 优化 | { google?: boolean } | |
| domain | SEO 优化的站点域名, 用于生成 sitemap | string | |

详细用法可以参考 [config.yml](https://github.com/MuYunyun/blog/blob/main/config.yml)
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.0",
"version": "1.1.0",
"command": {
"bootstrap": {
"npmClientArgs": [
Expand Down
2 changes: 1 addition & 1 deletion packages/crd-generator-sitemap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crd-generator-sitemap",
"version": "1.0.0",
"version": "1.1.0",
"description": "generator sitemap for create-react-doc",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/crd-seed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crd-seed",
"version": "1.0.0",
"version": "1.1.0",
"description": "Default Theme with Create React Doc",
"main": "index.js",
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/create-react-doc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-react-doc",
"version": "1.0.0",
"version": "1.1.0",
"description": "Fast static generated site. Just write markdown file.",
"homepage": "",
"bin": {
Expand All @@ -26,7 +26,7 @@
"dependencies": {
"@inquirer/input": "^0.0.13-alpha.0",
"commander": "^2.12.2",
"crd-scripts": "^1.0.0",
"crd-scripts": "^1.1.0",
"crd-templates": "^1.0.0",
"crd-theme": "^1.0.0",
"fs-extra": "^5.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/leetcode-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "crd-leetcode-cli",
"version": "1.0.0",
"version": "1.1.0",
"description": "Generate leetcode table autoly",
"bin": {
"leetcode": "./src/cli.js"
},
"dependencies": {
"axios": "^0.21.1",
"commander": "^2.20.0",
"crd-utils": "^1.0.0",
"crd-utils": "^1.1.0",
"enquirer": "^2.3.0",
"graphql-request": "^1.8.2",
"inquirer": "^7.3.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crd-scripts",
"version": "1.0.0",
"version": "1.1.0",
"description": "Scripts using with Create React Doc",
"main": "index.js",
"dependencies": {
Expand All @@ -24,7 +24,7 @@
"copy-template-dir": "^1.3.0",
"crd-prerender-spa-plugin": "^0.1.0",
"crd-theme": "^1.0.0",
"crd-utils": "^1.0.0",
"crd-utils": "^1.1.0",
"css-loader": "^0.28.7",
"css-minimizer-webpack-plugin": "^1.2.0",
"detect-port": "^1.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crd-utils",
"version": "1.0.0",
"version": "1.1.0",
"description": "Utils with create react doc",
"main": "index.js",
"dependencies": {
Expand Down

0 comments on commit d061c77

Please sign in to comment.