Hola, estoy intentando hacer un página con enrutamiento estático pero no me encuentra los archivos. ¿Qué está mal?
// pages/[lang]/[page].astro
---
import Layout from '@layouts/Layout.astro'
import type { GetStaticPaths } from 'astro'
import { type CollectionEntry, getCollection, render } from 'astro:content'
export const getStaticPaths = (async () => {
const wiki = await getCollection('wiki')
return wiki.map(page => {
return {
params: { page: page.id, lang: page.id.split('/')[0] },
props: { page }
}
})
}) satisfies GetStaticPaths
interface Props {
page: CollectionEntry<'wiki'>
}
const { page } = Astro.props
const { Content } = await render(page)
---
<Layout title={page.data.title}>
<Content />
</Layout>