This repository was archived by the owner on Jan 28, 2025. It is now read-only.
This repository was archived by the owner on Jan 28, 2025. It is now read-only.
ISR(Incremental Static Regeneration) feature not generating dynamic pages in s3 bucket #995
Closed
Description
pages are generated in s3 on this folder[static-pages/{**}.html and _next/data/{id}/*.json] build time only
when I open url like page/3 in my browser it's always show me loading state then comes up main content and this page is not being generated in s3
function Post({ post }) {
const router = useRouter()
if (router.isFallback) {
return <div>Loading...</div>
}
// Render post...
}
// This function gets called at build time
export async function getStaticPaths() {
return {
// Only `/posts/1` and `/posts/2` are generated at build time
paths: [{ params: { id: '1' } }, { params: { id: '2' } }],
// Enable statically generating additional pages
// For example: `/posts/3`
fallback: true,
}
}
// This also gets called at build time
export async function getStaticProps({ params }) {
const res = await fetch(`https://.../posts/${params.id}`)
const post = await res.json()
return {
props: { post },
revalidate: 5,
}
}
export default Post
Metadata
Metadata
Assignees
Labels
No labels