({
section,
subsection,
filename,
}: {
section?: string
subsection?: string
filename: string
})
| 2 | import { splitSlug } from "./split-slug" |
| 3 | |
| 4 | export function buildDocSlug({ |
| 5 | section, |
| 6 | subsection, |
| 7 | filename, |
| 8 | }: { |
| 9 | section?: string |
| 10 | subsection?: string |
| 11 | filename: string |
| 12 | }) { |
| 13 | const seg = [section, subsection, filename].map((s) => (s ?? "").trim()).filter(Boolean) |
| 14 | return seg.join("/") |
| 15 | } |
| 16 | |
| 17 | export function buildDocPathFromSlug(slug: string) { |
| 18 | const parts = slug.split("/").filter(Boolean) |
no outgoing calls
no test coverage detected
searching dependent graphs…