Pre-render stragety for CMS content
Hello π
I'm building a site which will potentially have 1000s of pages with content from a CMS. I wish to pre-render these pages, but the content from the CMS can potentially change daily.
I'm thinking a potential approach similar to that of ManniL in his video: https://www.youtube.com/watch?v=Qgsd6-Hsbz4, however I don't want to pre-render all of them on every deploy if only a select few have changed.
My problem is:
Does anyone have a smart solution to selective only pre-render certain pages where content has changed and re-use pre-rendered pages that have not changed?
Alexander Lichter
YouTube
Faster Nuxt Builds? π€ No problem β
π€ Nuxt 3 builds are already significantly faster than in Nuxt 2. But they can be even faster, especially if only data or server routes change. In this video, we will explore a module from Pooya, bringing back a "build cache" - and we will dive deep into how it works and why you want to use it.
Key points:
β© How to improve build time for re-buil...
6 Replies
There is
sharedPrerenderData
https://www.youtube.com/watch?v=1jUupYHVvrU but it still "requires" to prerender "everything" again. But you could build something custom to populate only the routes
that you want to render and then merge with the currently generated pagesAlexander Lichter
YouTube
Nuxt 3.10 - Speed up your build time with sharedPrerenderData
β° Nuxt 3.10 is out for a few days and brought quite some features! One of them is especially helpful for prerendered, often content-heavy sites. But what is it and how will it reduce our build time? Together we will have a look at the new experimental sharedPrerenderData features, figure out what it is and how it works!
Key points:
π Showcasing...
Thanks for reponse π Yes I'm thinking our own custom module with this logic would be a potential solution for us. Do you have any tips for how I should retrieve the already generated pages from a previous deploy?
probably checking the
.output
folder after generation (and maybe somehow saving the previously generated routes + "when" in a meta/log file or similarHmmm do you have any idea about the overhead for pre-rendering a few thousand pages? π If we assume we would never reach above 10k would this even be relevant?
it is mainly the increased build time
Alright thanks for the tips π I think my solution would quickly become pretty complicated. I will do some research,