优化更新日志 (#360)
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
neveler 2025-12-03 16:13:44 +08:00 committed by GitHub
parent 5c4d02c89e
commit 69179534e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View File

@ -118,6 +118,16 @@ defaults:
type: downloads
values:
toc: false
- scope:
path: _changelogs/dev
type: changelogs
values:
channel: dev
- scope:
path: _changelogs/stable
type: changelogs
values:
channel: stable
# liquid:
# error_mode: warn

View File

@ -5,7 +5,7 @@ layout: document
{{ content }}
{% assign channel = page.channel | default: 'stable' %}
{% assign changelogs = site.changelogs | where_exp: "item", "item.relative_path contains channel" | reverse %}
{% assign changelogs = site.changelogs | where: "channel", channel | reverse %}
{% for item in changelogs %}
{% assign version = item.slug %}
<h1 id="{% if forloop.index == 1 %}nowchange{% else %}HMCL-{{ version }}{% endif %}" data-version="{{ version }}">HMCL {{ version }}</h1>