Nuxt3/Content V2 static site - unable to query data in component?

I've been attempting to fetch some basic content into a navigation component (TheHeader.vue) - using the following const { data: navigation } = useFetch("navigation", () => queryContent("/website/navigation").findOne( Works fine if SSR is true, but I want to generate a static site, and when using nuxt generate with SSR set to false the content doesn't pull correctly into the component? I'm not sure exactly what I'm doing wrong, and the documentation doesn't seem to cover this (Either the nuxt 3 docs, or the content v2 docs) Any help much appreciated - have scoured the internet and the docs and can't seem to find an answer - also posted this same thing in the nuxt discord and haven't got an answer yet
3 Replies
Joao
Joao11mo ago
I think for something that specific you will have better luck asking in the Vue Discord: https://discord.gg/vue Not that you can't ask here but for something like this, I just want to give you a better chance at getting a useful answer
KDA
KDA11mo ago
Thankyou! If anyone ever has a 'prerendering' issue with nitro when using ssg and static then you need to disable prerender errors from stopping the build (setting in nuxtconfig.ts) Will post the fix I found in a mo, and detail the problem slightly better Just in case it's useful to anyone in the future
Joao
Joao11mo ago
Please do, I haven't looked into Nuxt yet so I have no idea about it but it's good to know I can search for questions here on Discord as well. Cheers!
Want results from more Discord servers?
Add your server