Upgrade dependencies.
This commit is contained in:
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user