Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 2 additions & 9 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@ steps:
environment:
JEKYLL_ENV: production
commands:
- touch Gemfile.lock
- chmod a+w Gemfile.lock
- chown -R jekyll:jekyll /drone
- gem sources --add https://mirrors.cloud.tencent.com/rubygems/ --remove https://rubygems.org/
- bundle config mirror.https://rubygems.org https://mirrors.cloud.tencent.com/rubygems
- bundle install
- bundle exec jekyll build --trace --verbose
- bash scripts/copy_index_json.sh
- bash scripts/build.sh
volumes:
- name: dist
path: /drone/src/_site
- name: cache
path: /drone/src/.jekyll-cache
path: /drone/src/src/.jekyll-cache
when:
branch: [main]

Expand Down
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,24 @@ Hello Minecraft! Launcher 帮助文档仓库

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

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

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

每篇文章结构如下:
```
_<category>/<article>.md

assets
* img
* docs
* <article>
* img1.png
* img2.png
* ...
```

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

`src/assets/img/docs/<article>`

- `img1.png`
- `img2.png`
- ...

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

每篇文章由 Markdown 编写的 `<article>.md` 文件及附带图片组成。文章的图片请放置到 `/src/assets/img/docs/<article>` 目录中。

### 添加新文章

Expand All @@ -46,6 +43,13 @@ assets

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

### 更新索引
在文章顶部应存在 [front-matter](https://jekyllrb.com/docs/front-matter/) 块。在 document 和 document-collection 布局的页面中,可以通过在 front-matter 指定相关参数完成署名。指定 `author: xxxx` 表示首次创建文章的用户,通过指定 `contributors: ['yyyy', 'zzzz']` 表示后续参与编辑文章的用户。

> 开始结束的三条横杠各占一行,中间为 YAML 数据。

在添加或修改文章后,请更新索引文件 `index.json`,以便 HMCL 展示你新添加的文件。
```
---
author: admin
contributors: ['foo', 'bar']
---
```
5 changes: 5 additions & 0 deletions _config.default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exclude:
- data
- includes
- layouts
- "*.*.md"
14 changes: 14 additions & 0 deletions _config.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
include:
- _pages
- "*.en.md"
exclude:
- data
- includes
- layouts
- "*.md"

locale: en
title: HMCL Document

head_scripts:
- /assets/js/theme.en.js
Loading