Files
website/node_modules/@astrojs/starlight/index.astro
2024-05-06 17:15:30 -04:00

20 lines
585 B
Plaintext

---
import type { InferGetStaticPropsType } from 'astro';
import { generateRouteData } from './utils/route-data';
import { paths } from './utils/routing';
import Page from './components/Page.astro';
export const prerender = true;
export async function getStaticPaths() {
return paths;
}
type Props = InferGetStaticPropsType<typeof getStaticPaths>;
const { Content, headings } = await Astro.props.entry.render();
const route = generateRouteData({ props: { ...Astro.props, headings }, url: Astro.url });
---
<Page {...route}><Content frontmatter={Astro.props.entry.data} /></Page>