Files
zeekayandHanzo Dev bf9fbd156f Document the whole library from its own source
The docs site renders every component the barrel names, the gallery
harvests rules for all of them, and the pages come from the packages
rather than a hand-kept copy.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-07 18:59:54 -07:00

21 lines
540 B
TypeScript

import type { LoaderProps } from 'one'
import { useLoader } from 'one'
import { Page } from '~/features/page'
export async function generateStaticParams() {
const { slugs } = await import('~/catalog')
return slugs()
.filter((s) => s !== 'index')
.map((slug) => ({ slug }))
}
export async function loader({ params }: LoaderProps<{ slug: string | string[] }>) {
const { doc } = await import('~/mdx')
return doc([params.slug].flat().join('/'))
}
export default function Route() {
return <Page {...useLoader(loader)} />
}