From bd6fb0ac91cb349c3994038bea26c57c989dd793 Mon Sep 17 00:00:00 2001 From: Sat Naing Date: Sun, 25 Sep 2022 19:04:59 +0630 Subject: [PATCH] Update slugify function with new function slugifyStr --- src/utils/getUniqueTags.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/getUniqueTags.ts b/src/utils/getUniqueTags.ts index 4e62cfb..f8f9ad7 100644 --- a/src/utils/getUniqueTags.ts +++ b/src/utils/getUniqueTags.ts @@ -1,4 +1,4 @@ -import slugify from "./slugify"; +import { slugifyStr } from "./slugify"; import type { MarkdownInstance } from "astro"; import type { Frontmatter } from "../types"; @@ -7,7 +7,7 @@ const getUniqueTags = (posts: MarkdownInstance[]) => { const filteredPosts = posts.filter(({ frontmatter }) => !frontmatter.draft); filteredPosts.forEach((post) => { tags = [...tags, ...post.frontmatter.tags] - .map((tag) => slugify(tag)) + .map((tag) => slugifyStr(tag)) .filter( (value: string, index: number, self: string[]) => self.indexOf(value) === index