Files
MyBlog-Next/src/utils/slugify.ts
T
Sat Naing 2827d4e7d8 refactor: replace postSlug with Astro content slug
* refactor: replace postSlug with Astro content slug

Remove postSlug from blog schema. Refactor articles that use postSlug. Remove slugify function from slugify util file. Replace slugify logic with Astro's content collections slug logic.

Closes: #186

* docs: update docs for removed slugify contents

* refactor: remove unused import
2023-12-27 10:20:55 +06:30

6 lines
187 B
TypeScript

import { slug as slugger } from "github-slugger";
export const slugifyStr = (str: string) => slugger(str);
export const slugifyAll = (arr: string[]) => arr.map(str => slugifyStr(str));