N
Nuxtβ€’3mo ago
Dovendyret

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
manniL
manniLβ€’3mo ago
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 pages
Alexander 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...
Dovendyret
Dovendyretβ€’3mo ago
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?
manniL
manniLβ€’3mo ago
probably checking the .output folder after generation (and maybe somehow saving the previously generated routes + "when" in a meta/log file or similar
Dovendyret
Dovendyretβ€’3mo ago
Hmmm 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?
manniL
manniLβ€’3mo ago
it is mainly the increased build time
Dovendyret
Dovendyretβ€’3mo ago
Alright thanks for the tips πŸ™‚ I think my solution would quickly become pretty complicated. I will do some research,