Open Mokkapps opened 2 years ago
Not exactly sure what's going on but I think it may be related to how nuxt does the transitions between pages.
If you wrap the ContentDoc
in a div it seems to fix it.
See here: https://stackblitz.com/edit/nuxt-content-v2-blog-demo-npjmnv?file=pages/blog/[...slug].vue
Not exactly sure what's going on but I think it may be related to how nuxt does the transitions between pages.
If you wrap the
ContentDoc
in a div it seems to fix it.See here: https://stackblitz.com/edit/nuxt-content-v2-blog-demo-npjmnv?file=pages/blog/[...slug].vue
Thanks, that works like a charm!
Each page, by documentation, in nuxt, has to contain only a single root element. Pages must have a single root element to allow route transitions between pages. (HTML comments are considered elements as well.)
All the above methods do not work for me.
All the above methods do not work for me.
If you provide a reproduction on stackblitz, I'll look into it
Im having a similar issue. is there any update to this?
Not exactly sure what's going on but I think it may be related to how nuxt does the transitions between pages.
If you wrap the
ContentDoc
in a div it seems to fix it.See here: https://stackblitz.com/edit/nuxt-content-v2-blog-demo-npjmnv?file=pages/blog/[...slug].vue
Just out of curiosity. What if you don't have a need for this plugin. How I understand the Content Doc component is to render markdown file etc. I have the same issue but render basic Vue components... Nothing special
Each page, by documentation, in nuxt, has to contain only a single root element.
This is what caused the issue for me, using pageTransition feature in the meantime. If you have a similar issue with Nuxt Content:
Environment
❯ npx nuxi info Nuxt CLI v3.0.0-rc.3 08:12:45 RootDir: /home/projects/nuxt-content-v2-blog-demo 08:12:47 Nuxt project info: 08:12:47
Linux
v16.14.2
3.0.0-rc.3
npm@7.17.0
vite
modules
,components
@nuxt/content@2.0.1
Build Modules:
-
Reproduction
https://stackblitz.com/edit/nuxt-content-v2-blog-demo
Describe the bug
Current Behavior
Console sometimes show an error, see "Logs" below.
If I refresh the empty page, the content body is shown correctly
Expected Behavior
Page content is visible without refreshing the page
Additional context
No response
Logs