N
Nuxt2y ago
Mads

Pre-render page but SSR when query string

Hi I'd like to build a page where I pre-render a page. Let's call it /blog. I then put the following settings in the Nuxt config like this:
nitro: {
prerender: {
crawlLinks: true,
routes: ["/"],
},
}
nitro: {
prerender: {
crawlLinks: true,
routes: ["/"],
},
}
This works perfectly and /blog is now pre-rendered. However, if I do something like this /blog?author=James it also works well and the page now displays values and it basically becomes a SPA, meaning the content of the page is not pre-rendered. What i'd like instead of it becoming a SPA, which means when JS is disabled it shows the page equal to /blog and not /blog?author=James, is for it to render with SSR. Thus, when navigating to /blog should be a pre-rendered page and /blog?author=James should be a server side rendered page. Is this at all possible?
1 Reply
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server