N
Nuxt5mo ago
jbool24

Selective use of Nuxt-Content for only part of the app possible?

Hiya, trying to set up a project uses nuxt-content to render pages for only certain routes ([/blog, /policy]). The expected target is Netlify so I have set NITRO_PRESET=netlify locally to inspect/debug the output of nuxi build. When I run the build locally I see warnings about isr being the default behavior for Netlify and the "Prerendering" step (which I assume is added by nuxt-content module) does not pickup '/' to output a index.html which causes 404 errors on Netlify. Is what I am trying to do possible? I tried using nitro.future.naitiveSWR = true which makes the warning go away locally but still fails on deployment. I also tried to add '/' to nitro.prerender.routes[] which outputs an index.html locally but still fails on Netlify because of the ISR stuff. Can I do what I'm trying to do or is using nuxt-content supposed to be a site-wide implementation?? Do i need to have an index.md and load data using queryContent('index') in order to get an index.html output?
No description
2 Replies
Single
Single5mo ago
I don't know about netlify but you definetly can use nuxt/content only partially, combined with "real" routes (pages).
jbool24
jbool245mo ago
@Single thanks. Hmm well I wonder what would cause errors because I have /blog using @nuxt/content but then index should be SSR but that server doesn't seem to compile an endpoint/entrypoint for index.html
Want results from more Discord servers?
Add your server