Add Pagefind search, sort posts by update time, link DigiKedai bot repo
Deploy / build (push) Successful in 20s

This commit is contained in:
hoelee committed 2026-09-06 07:31:02 +08:00
1 parent dfd9612a6b
commit 93c716f876
12 files changed
+369 -13

No files matched your search

+2 -2
View File
@@ -4,9 +4,9 @@ import PostList from '../components/PostList.astro';
import { getCollection } from 'astro:content';
import { isEn } from '../lib/lang';
import { SITE } from '../config';
import { sortByUpdated } from '../lib/sort';
const posts = (await getCollection('posts', isEn))
.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf());
const posts = sortByUpdated(await getCollection('posts', isEn));
---
<BaseLayout title={SITE.title} description={SITE.description}>