Skip to content

Commit 330ccf8

Browse files
committed
支持多语言
1 parent ec828e4 commit 330ccf8

File tree

385 files changed

+2457
-1926
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+2457
-1926
lines changed

.drone.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,12 @@ steps:
1111
environment:
1212
JEKYLL_ENV: production
1313
commands:
14-
- touch Gemfile.lock
15-
- chmod a+w Gemfile.lock
16-
- chown -R jekyll:jekyll /drone
17-
- gem sources --add https://mirrors.cloud.tencent.com/rubygems/ --remove https://rubygems.org/
18-
- bundle config mirror.https://rubygems.org https://mirrors.cloud.tencent.com/rubygems
19-
- bundle install
20-
- bundle exec jekyll build --trace --verbose
21-
- bash scripts/copy_index_json.sh
14+
- bash scripts/build.sh
2215
volumes:
2316
- name: dist
2417
path: /drone/src/_site
2518
- name: cache
26-
path: /drone/src/.jekyll-cache
19+
path: /drone/src/src/.jekyll-cache
2720
when:
2821
branch: [main]
2922

README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,24 @@ Hello Minecraft! Launcher 帮助文档仓库
1414

1515
我们推荐你使用 Typora 编写 Markdown 文章,该软件的使用方法和 Word 等传统文字排版软件相似,易于使用。
1616

17-
请注意,你在使用 Typora 时,请在 文件->偏好设置->图像 中,将 `插入图片时...` 选项修改为复制到指定路径为 `/assets/img/docs/${filename}` 目录
17+
请注意,你在使用 Typora 时,请在 文件->偏好设置->图像 中,将 `插入图片时...` 选项修改为复制到指定路径为 `/src/assets/img/docs/${filename}` 目录
1818

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

2222
每篇文章结构如下:
23-
```
24-
_<category>/<article>.md
25-
26-
assets
27-
* img
28-
* docs
29-
* <article>
30-
* img1.png
31-
* img2.png
32-
* ...
33-
```
3423

35-
其中,`<category>` 表示分类,如 `multiplayer` 表示多人游戏、`modpack` 表示整合包,`<article>` 表示你的文章的英文名(尖括号表示占位符,请替换为文章名称,不要直接提交 '`<article>`'),请仅使用英文字母、数字、中划线、下划线字符,不要使用空格、中文字符。请确保 md 文件名和文件夹名一致。具体可以参考已有文章目录格式。
24+
`src/collections/_<collection>/<article>.md`
25+
26+
`src/assets/img/docs/<article>`
27+
28+
- `img1.png`
29+
- `img2.png`
30+
- ...
3631

37-
每篇文章由 Markdown 编写的 `<article>.md` 文件及附带图片组成。文章的图片请放置到 `/assets/img/docs/<article>` 目录中。
32+
其中,`<collection>` 表示集合名称,如 `multiplayer` 表示多人游戏、`modpack` 表示整合包,`<article>` 表示你的文章的英文名(尖括号表示占位符,请替换为文章名称,不要直接提交 '`<article>`'),请仅使用英文字母、数字、中划线、下划线字符,不要使用空格、中文字符。请确保 md 文件名和文件夹名一致。具体可以参考已有文章目录格式。
33+
34+
每篇文章由 Markdown 编写的 `<article>.md` 文件及附带图片组成。文章的图片请放置到 `/src/assets/img/docs/<article>` 目录中。
3835

3936
### 添加新文章
4037

@@ -46,6 +43,13 @@ assets
4643

4744
修改已有文章时,请确保你的 PR 仅修改一个文章内容,并在该文章里署名。
4845

49-
### 更新索引
46+
在文章顶部应存在 [front-matter](https://jekyllrb.com/docs/front-matter/) 块。在 document 和 document-collection 布局的页面中,可以通过在 front-matter 指定相关参数完成署名。指定 `author: xxxx` 表示首次创建文章的用户,通过指定 `contributors: ['yyyy', 'zzzz']` 表示后续参与编辑文章的用户。
47+
48+
> 开始结束的三条横杠各占一行,中间为 YAML 数据。
5049
51-
在添加或修改文章后,请更新索引文件 `index.json`,以便 HMCL 展示你新添加的文件。
50+
```
51+
---
52+
author: admin
53+
contributors: ['foo', 'bar']
54+
---
55+
```

_config.default.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
exclude:
2+
- data
3+
- includes
4+
- layouts
5+
- "*.*.md"

_config.en.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
include:
2+
- _pages
3+
- "*.en.md"
4+
exclude:
5+
- data
6+
- includes
7+
- layouts
8+
- "*.md"
9+
10+
locale: en
11+
title: HMCL Document
12+
13+
head_scripts:
14+
- /assets/js/theme.en.js

0 commit comments

Comments
 (0)