fix: slugifyAll typo

This commit is contained in:
John Hooks
2023-02-10 05:26:55 -08:00
parent e74267fb91
commit bcae985671
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import { slufigyAll } from "./slugify"; import { slugifyAll } from "./slugify";
import type { CollectionEntry } from "astro:content"; import type { CollectionEntry } from "astro:content";
const getPostsByTag = (posts: CollectionEntry<"blog">[], tag: string) => 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; export default getPostsByTag;
+1 -1
View File
@@ -6,6 +6,6 @@ export const slugifyStr = (str: string) => slugger(str);
const slugify = (post: BlogFrontmatter) => const slugify = (post: BlogFrontmatter) =>
post.postSlug ? slugger(post.postSlug) : slugger(post.title); 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; export default slugify;