We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1059aea commit 1a7fbeeCopy full SHA for 1a7fbee
functions/ssr/src/pages/[...slug].astro
@@ -57,9 +57,10 @@ export async function getStaticPaths() {
57
if (slug) paths.push({ params: { slug } });
58
});
59
const postSlugs = await getConfig().getContent('blog/');
60
- postSlugs.forEach((_slug) => {
61
- paths.push({ params: { slug: `posts/${_slug}` } });
62
- });
+ const maxStaticPostSlugs = Math.min(postSlugs.length, 20);
+ for (let i = 0; i < maxStaticPostSlugs; i++) {
+ paths.push({ params: { slug: `posts/${postSlugs[i]}` } });
63
+ }
64
}
65
return paths;
66
0 commit comments