docs: add prepare script to generate sidebar (#11894)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import pkg from "slugify"
|
||||
const { default: slugify } = pkg
|
||||
|
||||
export function getSectionId(path: string[]) {
|
||||
path = path.map((p) => slugify(p.trim().toLowerCase()))
|
||||
return path.join("_")
|
||||
}
|
||||
Reference in New Issue
Block a user