Compare commits

...

2 Commits

Author SHA1 Message Date
585e7eb3a6 Fix article sort problem in non-zh environment. 2024-06-10 12:43:46 +08:00
83d584c529 Ignore test articles. 2024-06-10 12:42:53 +08:00
2 changed files with 4 additions and 1 deletions

3
.gitignore vendored
View File

@ -22,3 +22,6 @@ pnpm-debug.log*
# jetbrains setting folder
.idea/
# test articles
src/content/

View File

@ -36,7 +36,7 @@ const categoriedPostList: Array<CategoriedPosts> = allCategories.map((key) => {
if (postA.data.lastUpdate !== postB.data.lastUpdate) {
return postA.data.lastUpdate < postB.data.lastUpdate ? 1 : -1;
}
return postA.id.localeCompare(postB.id);
return postA.id.localeCompare(postB.id, 'zh-Hans-CN', { sensitivity: 'accent' });
}
)
: object[key].sort(