添加自定义过滤器以按版本号排序字符串 (#388)
continuous-integration/drone/push Build is passing

This commit is contained in:
neveler
2026-01-01 16:36:47 +08:00
committed by GitHub
parent 7b2b3ff08b
commit 74e03cc184
2 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ layout: document
{{ content }}
{% assign channel = page.channel | default: 'stable' %}
{% assign changelogs = site.changelogs | where: "channel", channel | reverse %}
{% assign changelogs = site.changelogs | where: "channel", channel | version_sort: "slug" | 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>