File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
apps/website/src/pages/docs/components Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ import { getCollection , render } from ' astro:content' ;
3+ import { DocsLayout } from ' @/layouts/docs-layout' ;
4+ import { MDXComponents } from ' @/ui/mdx/mdx-components' ;
5+ import { DocsNav } from ' @/components/docs-nav' ;
6+ import { TableOfContents } from ' @/components/table-of-contents' ;
7+
8+ export const getStaticPaths = async () => {
9+ const docsEntries = await getCollection (' componentsContent' );
10+
11+ return docsEntries .map ((entry ) => ({
12+ params: { slug: entry .id },
13+ props: { entry },
14+ }));
15+ };
16+
17+ const { entry } = Astro .props ;
18+ const { Content, headings } = await render (entry );
19+ ---
20+
21+ <DocsLayout .Root >
22+ <DocsLayout .Head />
23+ <DocsLayout .Body >
24+ <DocsLayout .Content >
25+ <DocsLayout .DocsNavAsideContainer >
26+ <DocsLayout .DocsNavAside >
27+ <DocsNav variant =" desktop" />
28+ </DocsLayout .DocsNavAside >
29+ </DocsLayout .DocsNavAsideContainer >
30+
31+ <DocsLayout .Main >
32+ <DocsLayout .Article >
33+ <Content components ={ MDXComponents } />
34+ </DocsLayout .Article >
35+ </DocsLayout .Main >
36+
37+ <DocsLayout .TableOfContentsAsideContainer >
38+ <DocsLayout .TableOfContentsAside >
39+ <TableOfContents headings ={ headings } />
40+ </DocsLayout .TableOfContentsAside >
41+ </DocsLayout .TableOfContentsAsideContainer >
42+ </DocsLayout .Content >
43+ </DocsLayout .Body >
44+ </DocsLayout .Root >
You can’t perform that action at this time.
0 commit comments