From fb308f7b11ca940497c40b428092489486093653 Mon Sep 17 00:00:00 2001 From: PrinOrange Date: Sat, 6 Jan 2024 16:37:43 +0800 Subject: [PATCH] Capitalize tag names to completely avoid ambiguity issues --- lib/post-process.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/post-process.ts b/lib/post-process.ts index 978a0ee..ccae41a 100644 --- a/lib/post-process.ts +++ b/lib/post-process.ts @@ -45,7 +45,7 @@ const sortOutPostLists = async (): Promise<{ for (let i = 0; i < postFilePaths.length; i++) { const frontmatter = await getFrontmatters(postFilePaths[i]); const postId = path.parse(postFilePaths[i]).name; - const capitalizedTags = frontmatter.tags?.map((tagname) => capitalizeFirstLetter(tagname)); + const normalizedTags = frontmatter.tags?.map((tagname) => tagname.toUpperCase()); const postListItem: TPostListItem = { id: postId, @@ -53,7 +53,7 @@ const sortOutPostLists = async (): Promise<{ title: frontmatter.title, subtitle: nullifyEmptyString(frontmatter.subtitle), coverURL: nullifyEmptyString(frontmatter.coverURL), - tags: capitalizedTags ?? [], + tags: normalizedTags ?? [], summary: nullifyEmptyString(frontmatter.summary), time: frontmatter.time, pin: frontmatter.pin ?? false,