Repository navigation
SWF(refactor): share the home and tag post list and date sort - #814
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
blog | 409ef22 | Commit Preview URL Branch Preview URL |
Nov 20 2026, 03:46 AM |
記事一覧の比較結果トップページとタグページ3件(PC、Astro、ガジェット)を、PR の
デスクトップ モバイル |
Summary
The home page and tag pages now render their post lists through one shared
PostListcomponent and onesortPostsByDateDescending()helper. Before this, each page had its own copy of the wrapper markup and the pubDate sort. The built HTML for/and all 26/tags/*pages is byte-identical tomain.src/components/PostList.astro: the wrapper,.container, gridulandPostItemlist. The default slot renders before theul, which is where the tag page's<h1>goes. Posts with nourlare skipped, which keeps the tag page's old guard.getPublishedPosts()always setsurl, so the home page is unaffected.sortPostsByDateDescending()insrc/lib/posts.ts: the same comparator as before, but it sorts a copy, so it no longer mutatespostsin place.getPublishedPosts()ordering is unchanged.tests/unit/posts.test.ts, plus a shortdocs/post-list.md(AGENTS.md asks for docs on new components).Evidence
Built HTML compared with
main, usingpnpm run build:cion both:A full
diff -rofdistdiffers only in link-card images on three posts and in RSS. Those come from external fetches at build time and differ between builds; this PR does not touch them.Try it:
pnpm run build:ci && pnpm exec astro preview, then open/and/tags/PC.QA Engineer: passed. In Chrome at 1280px and 390px, the full-page screenshots of
/and three tag pages (PC, Astro, ガジェット) differ by 0 pixels from main (report below in the comments).Implemented in session Share post list wrapper and date sort
Review with Devin · Open in Devin Desktop