Skip to content

Commit

Permalink
Comment getStaticPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryuni committed Mar 5, 2024
1 parent 8ca1e7d commit ff5024e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions examples/sitemap-ext/src/pages/blog/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ sitemap(async ({ setSitemap }) => {
export const prerender = false;
export async function getStaticPaths() {
const posts = await getCollection('blog');
return posts.map((post) => ({
params: { slug: post.slug },
props: post,
}));
}
// export async function getStaticPaths() {
// const posts = await getCollection('blog');
// return posts.map((post) => ({
// params: { slug: post.slug },
// props: post,
// }));
// }
type Props = CollectionEntry<'blog'>;
const post = Astro.props;
Expand Down

0 comments on commit ff5024e

Please sign in to comment.