-
-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content not statically generated when using queryContent
#1188
Comments
Also very interested in this. I created my nuxt app with nuxt/content, generated and shipped the public folder to a CDN. The result when peeking into the browser console:
I would expect that |
@colinlienard I did some research into this and this module doens't work with What I think you want to do is set |
Thanks for your answer (and sorry for my late reply, I was on vacation). I managed to get it to work using I also had a strange bug with locomotive-scroll that told me the document was not defined, which didn't happen before (I didn't change any code, just updated nuxt). To fix it, I now import the package dynamically: const locomotiveScroll = await import('locomotive-scroll');
scroll.value = new locomotiveScroll.default({ ... }); |
I tried setting target – vinayakkulkarni/vinayakkulkarni.dev@66989e4 but when I try to view the articles page – https://vinayakkulkarni.dev/articles/ I can view it but I cannot navigate to the article ?! edit: try clicking on the V logo, when it goes back to index.vue, nothing appears but if you refresh it the browser, you can see the homepage |
I think I am hitting perhaps the same thing? It seems to be impossible to load one post unless I first load all the posts. It does seems like SSR or generate are what is breaking here. If I hard refresh it loads nothing. |
Environment
Windows_NT
v17.0.0
3.0.0-rc.3
pnpm@7.1.7
vite
css
,modules
,ssr
,target
,typescript
@nuxt/content@2.0.0
-
Reproduction
My repo
Run
Describe the bug
I am building my personnal website and I want to prerender my pages with
nuxt generate
. Inside of my homepage, I am usingqueryContent
to get the data that I want to display (projects, skills and milestones).I also have a dynamic project page that should display the content of markdown files that are in
/content/projects/
Everything works fine in the dev environment but when i'm doing
nuxt generate
thennuxt preview
, everything that is related to Nuxt Content is not displayed. Also, none of my pages seems to be prerendered.What am I doing wrong ?
Additional context
My `nuxt.config.ts`:
My `package.json`:
Logs
No response
The text was updated successfully, but these errors were encountered: