Merge pull request #33 from johnhooks/fix/slugify-all-typo

fix: slugifyAll typo
This commit is contained in:
Sat Naing
2023-02-10 21:54:36 +06:30
committed by GitHub
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";
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;
+1 -1
View File
@@ -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;