Composables
Composable functions exported by shadcn-docs-nuxt.
useConfig()
Get the config from app.config.ts
.
main
,header
,aside
,footer
andtoc
can be set from_dir.yml
and anypage.md
file.
const {
site,
search,
header,
main,
aside,
footer,
toc,
} = useConfig();
useScrollspy()
Modified from docus. useScrollspy()
is used in docs layout to make the ToC display the currently visible headings.
const {
// Headings on the page
visibleHeadings,
// Active headings (for the current page)
activeHeadings,
// Update headings (an array of DOM nodes)
updateHeadings
} = useScrollspy();