Tengo este [...slug].astro
---
import type { GetStaticPaths } from 'astro';
import Layout from '../layouts/Layout.astro';
export const getStaticPaths = (async () => {
const contributors = [
{ username: 'Waxer59' },
{ username: 'dreyfus' },
{ username: 'mardroide' }
];
return contributors.map((contributor) => {
return {
params: {
username: contributor.username
},
props: { contributor }
};
});
}) satisfies GetStaticPaths;
const { username } = Astro.params;
const { contributor } = Astro.props;
---
<Layout title={`Astro Community Recap - ${username}`}>
<h1>Contributor: {contributor}</h1>
</Layout>
Y me sale el siguiente error:
20:21:00 [WARN] [router] A `getStaticPaths()` route pattern was matched, but no matching static path was found for requested path `/dreyfus`.
Possible dynamic routes being matched: src/pages/[...slug].astro.
20:21:00 [404] /dreyfus 1ms