diff --git a/package.json b/package.json index c606ea8b5..a11358444 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@types/react": "^18.0.20", "astro": "^1.1.7", "fuse.js": "^6.6.2", - "github-slugger": "^1.4.0", + "github-slugger": "^2.0.0", "remark-collapse": "^0.1.2", "remark-toc": "^8.0.1" }, diff --git a/src/utils/slugify.ts b/src/utils/slugify.ts index 7c1f14c4b..4a342ae5a 100644 --- a/src/utils/slugify.ts +++ b/src/utils/slugify.ts @@ -1,8 +1,6 @@ -import GithubSlugger from "github-slugger"; +import { slug as slugger } from "github-slugger"; import type { Frontmatter } from "src/types"; -const slugger = GithubSlugger.slug; - export const slugifyStr = (str: string) => slugger(str); const slugify = (frontmatter: Frontmatter) =>