Skip to content

Commit 38f32d2

Browse files
authored
更新 README.md (#286)
1 parent 15d6d3f commit 38f32d2

File tree

1 file changed

+61
-3
lines changed

1 file changed

+61
-3
lines changed

README.md

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# HMCL-docs
2+
3+
[![Build Status](https://drone.hmcl.net/api/badges/huanghongxun/HMCL-docs/status.svg)](https://drone.hmcl.net/huanghongxun/HMCL-docs)
4+
25
Hello Minecraft! Launcher 帮助文档仓库
36

47
您可以通过对本仓库提交 Pull Request 的方式来为 HMCL 帮助文档贡献自己的力量!
@@ -17,11 +20,12 @@ Hello Minecraft! Launcher 帮助文档仓库
1720
请注意,你在使用 Typora 时,请在 文件->偏好设置->图像 中,将 `插入图片时...` 选项修改为复制到指定路径为 `/assets/img/docs/${filename}` 目录
1821

1922
## 贡献
23+
2024
本仓库组织方式为一篇文章放在一个目录中。如果你要提交 PR,请不要将 md 文件直接放在根目录下。
2125

2226
每篇文章结构如下:
2327
```
24-
_<category>/<article>.md
28+
_<collection>/<article>.md
2529
2630
assets
2731
* img
@@ -32,9 +36,9 @@ assets
3236
* ...
3337
```
3438

35-
其中,`<category>` 表示分类,如 `multiplayer` 表示多人游戏、`modpack` 表示整合包,`<article>` 表示你的文章的英文名(尖括号表示占位符,请替换为文章名称,不要直接提交 '`<article>`'),请仅使用英文字母、数字、中划线、下划线字符,不要使用空格、中文字符。请确保 md 文件名和文件夹名一致。具体可以参考已有文章目录格式。
39+
其中,`<collection>` 表示集合,如 `multiplayer` 表示多人游戏、`modpack` 表示整合包,`<article>` 表示你的文章的英文唯一标识(尖括号表示占位符,不要直接提交 `<article>`,请确保其唯一且简短)请仅使用英文字母、数字、中划线、下划线字符作为唯一标识,不要使用空格、英文句点、中文字符。请确保资源文件夹名和 md 文件名一致,具体可以参考已有文章目录格式。
3640

37-
每篇文章由 Markdown 编写的 `<article>.md` 文件及附带图片组成文章的图片请放置到 `/assets/img/docs/<article>` 目录中。
41+
每篇文章由 Markdown 编写的 `<article>.md` 文件及附带图片组成文章的图片请放置到 `/assets/img/docs/<article>` 目录中)在 Markdown 文件中请确保包含 [Front Matter](https://jekyllrb.com/docs/front-matter/) 其中应提供文章的一些元数据(如标题 `title` 更新日期 `date` 等)在 `_config.yml``defaults` 中配置有默认值的可以不指定
3842

3943
### 添加新文章
4044

@@ -49,3 +53,57 @@ assets
4953
### 更新索引
5054

5155
在添加或修改文章后,请更新索引文件 `index.json`,以便 HMCL 展示你新添加的文件。
56+
57+
### 本地部署
58+
59+
项目是基于 Jekyll 实现的静态网站,使用 Minimal Mistakes 主题。
60+
61+
如果您想更深入的参与项目文档的维护,可参阅以下内容。
62+
63+
#### 前置条件
64+
65+
- `Ruby` 版本大于等于 `3.1` (项目构建版本 `3.4`
66+
67+
#### 安装 bundle
68+
69+
> 环境中已安装 `bundle` 可跳过本节
70+
71+
```shell
72+
gem install bundler
73+
```
74+
75+
#### 下载源码
76+
77+
> `git` 为例,您也可以通过 `github` 下载源码压缩包或其它方式下载源码。
78+
79+
```shell
80+
# 克隆项目到本地
81+
git clone https://github.com/HMCL-dev/HMCL-docs.git
82+
# 进入项目根目录
83+
cd HMCL-docs
84+
```
85+
86+
#### 安装依赖
87+
88+
```shell
89+
# 配置镜像(请自行根据网络环境决定是否需要使用镜像,此处以腾讯云镜像为例)
90+
bundle config mirror.https://rubygems.org https://mirrors.cloud.tencent.com/rubygems
91+
# 配置项目依赖安装路径
92+
bundle config path vendor/bundle
93+
# 安装项目依赖
94+
bundle install
95+
```
96+
97+
#### 启动本地开发服务器
98+
99+
```shell
100+
bundle exec jekyll serve
101+
```
102+
103+
#### 本地构建产物
104+
105+
> 根据需要配置环境变量,配置 `JEKYLL_ENV=production` 表示生产环境构建。
106+
107+
```shell
108+
bundle exec jekyll build
109+
```

0 commit comments

Comments
 (0)