mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
fix: slugifyAll typo
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user