Upgrade dependencies.

This commit is contained in:
2025-03-14 15:27:47 +08:00
parent 498fa8519e
commit bc19f9a638
12 changed files with 2984 additions and 3058 deletions

View File

@@ -1,5 +1,5 @@
---
import type { CollectionEntry, ContentEntryMap } from "astro:content";
import type { CollectionEntry } from "astro:content";
import { getCollection, type CollectionKey } from "astro:content";
import CategorySummary from "./CategorySummary.astro";
@@ -57,9 +57,9 @@ const categoriedPostList: Array<CategoriedPosts> = allCategories.map((key) => {
} else if (sortByArticleTitle) {
// sort article by title
// get articles with titles started in Chinese or the alphabet
let postWithAlphabetStartedTitle: CollectionEntry<keyof ContentEntryMap>[] =
let postWithAlphabetStartedTitle: CollectionEntry<CollectionKey>[] =
object[key].filter((post) => /^[a-zA-Z]/.test(post.data.title));
let postWithChineseStartedTitle: CollectionEntry<keyof ContentEntryMap>[] =
let postWithChineseStartedTitle: CollectionEntry<CollectionKey>[] =
object[key].filter((post) => /^[^a-zA-Z]/.test(post.data.title));
// sort two Array by article title
postWithAlphabetStartedTitle.sort((postA, postB) =>