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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ group :jekyll_plugins do
gem "jekyll-gist", "1.5.0"
gem "jekyll-feed", "0.17.0"
gem "jekyll-include-cache", "0.2.1"
gem "jekyll-redirect-from", "0.16.0"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
Expand Down
54 changes: 40 additions & 14 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ sass:
silence_deprecations:
- import
collections:
docs:
output: true
permalink: /:path:output_ext
launcher:
output: true
permalink: /:collection/:path:output_ext
Expand All @@ -31,9 +28,6 @@ collections:
modpack:
output: true
permalink: /:collection/:path:output_ext
eula:
output: true
permalink: /:collection/:path:output_ext
multiplayer:
output: true
permalink: /:collection/:path:output_ext
Expand Down Expand Up @@ -66,13 +60,15 @@ plugins:
- jekyll-gist
- jekyll-feed
- jekyll-include-cache
- jekyll-redirect-from
# minimal-mistakes (mimic GitHub Pages with --safe)
# whitelist:
# - jekyll-paginate
# - jekyll-sitemap
# - jekyll-gist
# - jekyll-feed
# - jekyll-include-cache
whitelist:
- jekyll-paginate
- jekyll-sitemap
- jekyll-gist
- jekyll-feed
- jekyll-include-cache
- jekyll-redirect-from

# Conversion
# markdown: kramdown
Expand Down Expand Up @@ -116,6 +112,38 @@ defaults:
type: downloads
values:
toc: false
classes: wide
- scope:
path: _pages
type: pages
values:
toc: false
classes: wide
permalink: /:basename:output_ext
- scope:
path: _pages/changelogs/
type: pages
values:
toc: true
classes: ""
layout: changelog
permalink: /changelogs/:basename:output_ext
- scope:
path: _pages/changelogs/dev
type: pages
values:
channel: dev
- scope:
path: _pages/changelogs/stable
type: pages
values:
channel: stable
- scope:
path: _pages/collections/
type: pages
values:
layout: collection
permalink: /collections/:basename:output_ext

# liquid:
# error_mode: warn
Expand Down Expand Up @@ -311,8 +339,6 @@ head_scripts:
# jekyll-feed
feed:
collections:
- docs
- launcher
- modpack
- eula
- multiplayer
6 changes: 6 additions & 0 deletions _data/hmcl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dev:
nowchange: 3.7.0.302
# nowpreview:
stable:
nowchange: 3.6.20
# nowpreview:
44 changes: 27 additions & 17 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
main:
- title: 常见问题
url: /faq.html
- title: 贡献指南
url: /contribution.html
- title: 报错反馈
url: /crash-support-group.html
- title: 用户交流
url: /groups.html
- title: 用户协议
url: /eula.html
- title: 帮助
url: /help.html
- title: 更新日志
url: /changelogs.html

docs:
- title: 问题集合
children:
- title: 常见问题
url: /faq.html
- title: 启动器使用相关
url: /launcher/
- title: 整合包帮助
url: /modpack/
- title: 多人联机帮助
url: /multiplayer/
- title: 使用者帮助
children:
- title: 版本隔离
Expand Down Expand Up @@ -41,13 +43,21 @@ docs:
- title: 添加默认 authlib-injector 验证服务器
url: /launcher/authlib-injector.html
description: 本文将告诉你如何设置默认的验证服务器。
- title: 其他
- title: 文档集合
children:
- title: 多人联机
url: /collections/multiplayer.html
- title: 整合包
url: /collections/modpack.html
- title: 启动器
url: /collections/launcher.html
- title: 下载
url: /collections/downloads.html
- title: 相关链接
children:
- title: 为 HMCL 做出贡献
url: /contribution.html
- title: HMCL GitHub 地址
- title: 项目官网
url: https://hmcl.huangyuhui.net
- title: 项目仓库
url: https://github.com/HMCL-dev/HMCL
- title: HMCL 帮助文档 GitHub 地址
- title: 文档仓库
url: https://github.com/HMCL-dev/HMCL-docs
- title: HMCL 官网
url: https://hmcl.huangyuhui.net
8 changes: 0 additions & 8 deletions _docs/404.md

This file was deleted.

8 changes: 7 additions & 1 deletion _layouts/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
layout: document
---

{% assign root_version = '' %}
{% assign channel = page.channel | default: 'stable' %}
{% assign changelogs = site.changelogs | where_exp: "item", "item.relative_path contains channel" | reverse %}
{% for item in changelogs %}
{% assign path = item.relative_path | split: '/' %}
{% if path[2] != root_version %}
{% assign root_version = path[2] %}
<h1 id="HMCL-{{ root_version }}">HMCL {{ root_version }}</h1>
{% endif %}
{% assign version = item.slug %}
<h1 id="{% if version == page.nowchange %}nowchange{% elsif version == page.nowpreview %}nowpreview{% else %}HMCL-{{ version }}{% endif %}">HMCL {{ version }}</h1>
<h2 id="HMCL-{{ version }}">HMCL {{ version }}</h2>
<div>{{ item.content | markdownify }}</div>
{% endfor %}
12 changes: 12 additions & 0 deletions _pages/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: splash
title: 页面未找到
---

<!----{{ '>' }}{% capture section %}{{ '<' }}!---->

# 页面未找到

抱歉,您尝试查看的页面不存在。

<!----{{ '>' }}{% endcapture %}<div class="notice--danger">{{ section | markdownify }}</div>{{ '<' }}!---->
22 changes: 22 additions & 0 deletions _pages/changelog/dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
layout: compress
permalink: /changelog/dev.html
---

<!----{{ '>' }}
<script>location = "{% link {{ '_pages/changelogs/dev.md' }} %}"</script>
{% assign changelogs = site.changelogs | where_exp: "item", "item.relative_path contains 'dev'" | reverse %}
{% assign changelogs = changelogs | where_exp: "item", "item.slug == site.data.hmcl.dev.nowchange or item.slug == site.data.hmcl.dev.nowpreview" %}
{% for item in changelogs %}
{% assign version = item.slug %}
<h1 id="{% if version == site.data.hmcl.dev.nowchange %}nowchange{% elsif version == site.data.hmcl.dev.nowpreview %}nowpreview{% else %}HMCL-{{ version }}{% endif %}">HMCL {{ version }}</h1>
<div>{{ item.content | markdownify }}</div>
{% endfor %}
{{ '<' }}!---->

<!--{% comment %}-->

> [!NOTE]
> 该页面仅用于客户端获取更新日志

<!--{% endcomment %}-->
22 changes: 22 additions & 0 deletions _pages/changelog/stable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
layout: compress
permalink: /changelog/stable.html
---

<!----{{ '>' }}
<script>location = "{% link {{ '_pages/changelogs/stable.md' }} %}"</script>
{% assign changelogs = site.changelogs | where_exp: "item", "item.relative_path contains 'stable'" | reverse %}
{% assign changelogs = changelogs | where_exp: "item", "item.slug == site.data.hmcl.stable.nowchange or item.slug == site.data.hmcl.stable.nowpreview" %}
{% for item in changelogs %}
{% assign version = item.slug %}
<h1 id="{% if version == site.data.hmcl.stable.nowchange %}nowchange{% elsif version == site.data.hmcl.stable.nowpreview %}nowpreview{% else %}HMCL-{{ version }}{% endif %}">HMCL {{ version }}</h1>
<div>{{ item.content | markdownify }}</div>
{% endfor %}
{{ '<' }}!---->

<!--{% comment %}-->

> [!NOTE]
> 该页面仅用于客户端获取更新日志

<!--{% endcomment %}-->
6 changes: 6 additions & 0 deletions _pages/changelogs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 更新日志
---

- [开发版更新日志](./changelogs/dev.html)
- [稳定版更新日志](./changelogs/stable.html)
4 changes: 0 additions & 4 deletions _changelog/dev.md → _pages/changelogs/dev.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
layout: changelog
channel: dev
nowchange: 3.7.0.302
# nowpreview:
title: 开发版更新日志
date: 2021-08-22 23:18:02 +0800
note: Changelogs are written in Chinese.
Expand Down
3 changes: 0 additions & 3 deletions _changelog/stable.md → _pages/changelogs/stable.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
layout: changelog
nowchange: 3.6.20
# nowpreview:
title: 稳定版更新日志
date: 2021-08-22 23:18:02 +0800
note: Changelogs are written in Chinese.
Expand Down
4 changes: 4 additions & 0 deletions _pages/collections/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 更新日志
collection: changelog
---
6 changes: 6 additions & 0 deletions _pages/collections/docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 文档
collection: docs
redirect_from:
- /docs/index.html
---
6 changes: 6 additions & 0 deletions _pages/collections/downloads.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 下载
collection: downloads
redirect_from:
- /downloads/index.html
---
6 changes: 6 additions & 0 deletions _pages/collections/launcher.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 启动器
collection: launcher
redirect_from:
- /launcher/index.html
---
6 changes: 6 additions & 0 deletions _pages/collections/modpack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 整合包
collection: modpack
redirect_from:
- /modpack/index.html
---
6 changes: 6 additions & 0 deletions _pages/collections/multiplayer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 多人联机
collection: multiplayer
redirect_from:
- /multiplayer/index.html
---
2 changes: 1 addition & 1 deletion _docs/contribution.md → _pages/contribution.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 为 HMCL 帮助文档出一份力
title: 贡献指南
date: 2021-10-09 23:18:02 +0800
author: huanghongxun
---
Expand Down
30 changes: 7 additions & 23 deletions _docs/crash-support-group.md → _pages/crash-support-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ author: zkitefly

由于加群人数过多,我们会移出问题已解决的用户。如果你在被移出后遇到了新的问题需要求助,你可以再次加群。

<!----{{ '>' }}
<script>
document.addEventListener('DOMContentLoaded', function() {
const modal = document.createElement('div');
Expand All @@ -29,35 +30,16 @@ document.addEventListener('DOMContentLoaded', function() {
`;

const modalContent = document.createElement('div');
modalContent.style.cssText = `
background: white;
padding: 20px;
border-radius: 8px;
max-width: 500px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
position: relative;
`;
modalContent.className = 'notice';

let timeLeft = 10 ; /* 倒计时秒数 */
const closeButton = document.createElement('button');
closeButton.textContent = '我已了解';
closeButton.style.cssText = `
display: block;
margin: 15px auto 0;
padding: 8px 20px;
background: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: not-allowed;
opacity: 0.6;
`;
closeButton.className = 'align-center btn';
closeButton.disabled = true;

modalContent.innerHTML = `
<h1>⚠️加入群聊前请注意⚠️</h2>
<h1 class="text-center">⚠️加入群聊前请注意⚠️</h1>
<ul>
<li>游戏非正常退出时,请点击左下角 <img src="/assets/img/docs/groups/button-1.png" style="display: inline; height: 1.5em; vertical-align: middle;" title="导出游戏崩溃日志"> 按钮(不是 <img src="/assets/img/docs/groups/button-2.png" style="display: inline; height: 1.5em; vertical-align: middle;" title="日志"> 按钮),并完整发送生成的报错压缩包</li>
<li>遇到其他问题时,请详细说明情况并提供相关截图,以便我们提供帮助</li>
Expand All @@ -71,7 +53,8 @@ document.addEventListener('DOMContentLoaded', function() {
<li>因人数限制,已解决问题的用户会被移出群聊。如遇新问题可再次加入</li>
<li>本群仅处理游戏崩溃相关问题,其他话题请到其他群讨论</li>
</ul>
<p style="text-align: center; margin-top: 15px;">
<hr>
<p class="text-center">
请等待 <span id="countdown">${timeLeft}</span> 秒,请认真阅读注意事项
</p>
`;
Expand Down Expand Up @@ -101,3 +84,4 @@ document.addEventListener('DOMContentLoaded', function() {
});
});
</script>
{{ '<' }}!---->
8 changes: 0 additions & 8 deletions _pages/docs.md

This file was deleted.

Loading