Make Blog Tags case insensitive

This commit is contained in:
prototypa
2022-12-24 09:13:04 -05:00
parent b9b734adc7
commit 0b58f53e09
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ export async function getStaticPaths({ paginate }) {
return Array.from(tags).map((tag) =>
paginate(
posts.filter((post) => Array.isArray(post.tags) && post.tags.includes(tag)),
posts.filter((post) => Array.isArray(post.tags) && post.tags.find((elem) => elem.toLowerCase() === tag)),
{
params: { tag: cleanSlug(tag), tags: TAG_BASE || undefined },
pageSize: BLOG.postsPerPage,