I just completed the migration of this website from Jekyll to Next.js (deployed using Vercel). New blog posts will be powered by a Notion database.
If you haven’t checked out Next.js before, take a look at the Incremental Static Regeneration page of the Next.js documentation for one of its powerful features!
When a request is made to a page that was pre-rendered at build time, it will initially show the cached page.
- Any requests to the page after the initial request and before 10 seconds are also cached and instantaneous.
- After the 10-second window, the next request will still show the cached (stale) page
- Next.js triggers a regeneration of the page in the background.
- Once the page generates successfully, Next.js will invalidate the cache and show the updated page. If the background regeneration fails, the old page would still be unaltered.
If you are interested in integrating Notion as a CMS, there is great example code in How to Create Next.js Blog Using Notion as a CMS
Overall, I’m quite impressed by Next.js and would definitely be using it in future projects.