Use JavaScript slice function for home page changelog
All checks were successful
Deploy to Hostinger / Build and Push (push) Successful in 43s

This commit is contained in:
Leilukin 2025-05-05 21:30:02 +08:00
parent a47d350665
commit 84d972cfeb

View File

@ -51,7 +51,7 @@ eleventyComputed:
<section class="content__section"> <section class="content__section">
<h2>What is New?</h2> <h2>What is New?</h2>
<div class="text-box"> <div class="text-box">
{{ for log of collections["changelogs"] |> toReversed |> itemLimit(1) }} {{ for log of collections["changelogs"] |> toReversed |> slice(0, 1) }}
<h3>{{ log.data.title }}</h3> <h3>{{ log.data.title }}</h3>
{{ log.content }} {{ log.content }}
{{ /for }} {{ /for }}