-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[build-output-api] Update On-Demand ISR example with expiration: false
prerenders
#374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
67 Ignored Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I left a few suggestions to simplify a bit.
build-output-api/on-demand-isr/.vercel/output/functions/blog/[slug].prerender-config.json
Outdated
Show resolved
Hide resolved
build-output-api/on-demand-isr/.vercel/output/functions/blog/post-2.prerender-config.json
Outdated
Show resolved
Hide resolved
build-output-api/on-demand-isr/.vercel/output/functions/blog/post-1.prerender-config.json
Outdated
Show resolved
Hide resolved
There is also an example of a blog that only generates new paths when triggered via On-Demand ISR with two initial posts that are prerendered. | ||
|
||
- `/blog/[slug]` | ||
- base post prerender that allows generating news paths via On-Demand ISR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an API endpoint to trigger this? Or should we document a fetch()
call example or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add a revalidate endpoint for this similar to the other for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 1758bd1
I also wonder if we should split this into a separate example ( |
Co-authored-by: Nathan Rajlich <[email protected]>
I'm not sure if we want to have a separate example for this as we've kinda sunset the ISG documentation in favor of the ISR docs to prevent confusion between the two. |
expiration: false
prerenders
…se` prerenders (#374) * Update On-Demand ISR example with expiration: false prerenders * Apply suggestions from code review Co-authored-by: Nathan Rajlich <[email protected]> * Add revalidate link * fix match Co-authored-by: Nathan Rajlich <[email protected]>
Description
This adds an example of
expiration: false
prerenders to our On-Demand ISR example as we've had some questions about handling this. This is specifically demonstrating how On-Demand ISR can be used in combination withroutes
to only generate paths via On-Demand ISR instead of whenever a user visits a new path.x-ref: vercel/vercel#8289 (reply in thread)
x-ref: slack thread
Deployed example can be seen here https://boa-on-demand-fysl8lh1b-ijjk-testing.vercel.app/blog/post-1
Demo URL
Type of Change
New Example Checklist
npm run new-example
was used to create the example