summaryrefslogtreecommitdiff
path: root/layouts/_partials
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-10-30 11:59:50 +0800
committerEltrac <hi@guhub.cn>2025-10-30 11:59:50 +0800
commit9e6cb4e4d6c40b9060f8b64643bb5d6615ef7fa0 (patch)
tree39caec1f8aaac41cd0ec2c624636a3172c371210 /layouts/_partials
parent8e1b9428065ffda12ad5cb0a1fee6364ae942709 (diff)
perf: reduce DOM size by showing less posts at home
Diffstat (limited to 'layouts/_partials')
-rw-r--r--layouts/_partials/home/latest-posts.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_partials/home/latest-posts.html b/layouts/_partials/home/latest-posts.html
index cf80ece6..8195b481 100644
--- a/layouts/_partials/home/latest-posts.html
+++ b/layouts/_partials/home/latest-posts.html
@@ -2,7 +2,7 @@
<section class="pagefind-exclude">
<div class="flex flex-col my-4">
{{ $firstPost := true }} <!-- 初始化标记 -->
- {{ range first 12 (where site.RegularPages "Type" "in" site.Params.mainSections) }}
+ {{ range first 5 (where site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ partial "items/post" (dict
"ctx" .
"showSummary" $firstPost