Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 3x 14x 14x 14x 28x | import { buildWiki } from "#layers/wiki/app/utils/wiki.ts";
/** Built once per session under one key — every doc page renders the same nav, and re-deriving it per navigation would rebuild the tree on each click. */
export const useWiki = () => {
const { t } = useI18n();
return useAsyncData(
"wiki",
async () => buildWiki(await queryCollection("docs").select("path", "title").all(), t),
{ default: () => [] },
);
};
|