diff --git a/src/utils/getPostsByTag.ts b/src/utils/getPostsByTag.ts index ed59eedaa..d9c871154 100644 --- a/src/utils/getPostsByTag.ts +++ b/src/utils/getPostsByTag.ts @@ -1,7 +1,7 @@ -import { slufigyAll } from "./slugify"; +import { slugifyAll } from "./slugify"; import type { CollectionEntry } from "astro:content"; const getPostsByTag = (posts: CollectionEntry<"blog">[], tag: string) => - posts.filter(post => slufigyAll(post.data.tags).includes(tag)); + posts.filter(post => slugifyAll(post.data.tags).includes(tag)); export default getPostsByTag; diff --git a/src/utils/slugify.ts b/src/utils/slugify.ts index 55b726b94..31f212b90 100644 --- a/src/utils/slugify.ts +++ b/src/utils/slugify.ts @@ -6,6 +6,6 @@ export const slugifyStr = (str: string) => slugger(str); const slugify = (post: BlogFrontmatter) => post.postSlug ? slugger(post.postSlug) : slugger(post.title); -export const slufigyAll = (arr: string[]) => arr.map(str => slugifyStr(str)); +export const slugifyAll = (arr: string[]) => arr.map(str => slugifyStr(str)); export default slugify;