Capitalize tag names to completely avoid ambiguity issues
This commit is contained in:
@@ -45,7 +45,7 @@ const sortOutPostLists = async (): Promise<{
|
|||||||
for (let i = 0; i < postFilePaths.length; i++) {
|
for (let i = 0; i < postFilePaths.length; i++) {
|
||||||
const frontmatter = await getFrontmatters(postFilePaths[i]);
|
const frontmatter = await getFrontmatters(postFilePaths[i]);
|
||||||
const postId = path.parse(postFilePaths[i]).name;
|
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 = {
|
const postListItem: TPostListItem = {
|
||||||
id: postId,
|
id: postId,
|
||||||
@@ -53,7 +53,7 @@ const sortOutPostLists = async (): Promise<{
|
|||||||
title: frontmatter.title,
|
title: frontmatter.title,
|
||||||
subtitle: nullifyEmptyString(frontmatter.subtitle),
|
subtitle: nullifyEmptyString(frontmatter.subtitle),
|
||||||
coverURL: nullifyEmptyString(frontmatter.coverURL),
|
coverURL: nullifyEmptyString(frontmatter.coverURL),
|
||||||
tags: capitalizedTags ?? [],
|
tags: normalizedTags ?? [],
|
||||||
summary: nullifyEmptyString(frontmatter.summary),
|
summary: nullifyEmptyString(frontmatter.summary),
|
||||||
time: frontmatter.time,
|
time: frontmatter.time,
|
||||||
pin: frontmatter.pin ?? false,
|
pin: frontmatter.pin ?? false,
|
||||||
|
|||||||
Reference in New Issue
Block a user