perf(content): ️ reduce archive page size by stripping post body (#541)

* perf(content): ️ reduce archive page size by stripping post body

* apply biome fix

* refactor: Separate function responsibilities (removed unnecessary linkage of preceding and following slugs)

---------

Co-authored-by: L4Ph <me@l4ph.moe>
This commit is contained in:
Swizzer
2025-07-13 13:47:00 +08:00
committed by GitHub
parent 297db1384c
commit 3ff71d031b
2 changed files with 25 additions and 5 deletions
+3 -3
View File
@@ -3,12 +3,12 @@ import ArchivePanel from "@components/ArchivePanel.svelte";
import I18nKey from "@i18n/i18nKey";
import { i18n } from "@i18n/translation";
import MainGridLayout from "@layouts/MainGridLayout.astro";
import { getSortedPosts } from "../utils/content-utils";
import { getSortedPostsList } from "../utils/content-utils";
const sortedPosts = await getSortedPosts();
const sortedPostsList = await getSortedPostsList();
---
<MainGridLayout title={i18n(I18nKey.archive)}>
<ArchivePanel sortedPosts={sortedPosts} client:only="svelte"></ArchivePanel>
<ArchivePanel sortedPosts={sortedPostsList} client:only="svelte"></ArchivePanel>
</MainGridLayout>