From c26e52160fede6448345bb0561b15fb9e7ea8cb8 Mon Sep 17 00:00:00 2001 From: Blake Date: Sat, 4 Jul 2026 08:42:19 +0900 Subject: [PATCH] refactor: cap /blog's Latest section instead of listing every post MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Latest rendered all published posts in a flat list, which fully duplicated Study Notes and Site Notes (already listed in full just above) and re-listed every project post that Project Docs only summarized as a card. As the archive grows this section would keep growing unbounded and the curated sections above it would lose their point. Cap it to the 5 most recent posts across all categories — still gives a chronological pulse without becoming a second full archive on the same page. --- src/pages/blog/index.astro | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 30283bd..f799e7e 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -12,6 +12,8 @@ import { } from '../../lib/blog'; import { seriesList } from '../../lib/taxonomy'; +const RECENT_POSTS_LIMIT = 5; + const posts = await getPublishedBlogPosts(); const projectGroups = (['unilink', 'ai-curator'] as BlogProject[]) .map((project) => ({ @@ -21,6 +23,7 @@ const projectGroups = (['unilink', 'ai-curator'] as BlogProject[]) .filter((group) => group.posts.length > 0); const studyPosts = getStudyPosts(posts); const sitePosts = getSitePosts(posts); +const recentPosts = posts.slice(0, RECENT_POSTS_LIMIT); const getProjectDocTitle = (project: BlogProject) => seriesList.find((series) => series.project === project)?.title ?? projectLabels[project]; @@ -136,7 +139,7 @@ const getProjectDocTitle = (project: BlogProject) =>