Skip to content
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

Layout duplicated in document driven mode #1807

Closed
ceceliacreates opened this issue Jan 7, 2023 · 2 comments
Closed

Layout duplicated in document driven mode #1807

ceceliacreates opened this issue Jan 7, 2023 · 2 comments

Comments

@ceceliacreates
Copy link

Environment

  • Operating System: Darwin
  • Node Version: v16.19.0
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: npm@8.19.3
  • Builder: vite
  • User Config: modules, content, css
  • Runtime Modules: @nuxt/content@2.2.2, @nuxt/image-edge@1.0.0-27809804.194d2d6
  • Build Modules: -

Reproduction

Minimal reproduction:
https://content.nuxtjs.org/examples/essentials/document-driven

Also seeing it in my own project:
https://github.com/ceceliacreates/nuxt-content-v2-doc-driven

Describe the bug

On the about page in the example for document driven mode in the docs, the

<div class="pb-4 border-b border-gray-500">
      Article layout
    </div>

Above the <slot /> appears twice when navigating to the page.

Screenshot 2023-01-07 at 4 39 05 PM

This is happening for my project as well. Components around the <slot /> appear twice when navigating to the page with the blog.vue layout. On refresh, the duplicate components disappear and the page renders correctly.

Additional context

No response

Logs

No response

@nobkd
Copy link
Contributor

nobkd commented Jan 8, 2023

You have to remove the <NuxtLayout> tag from your app.vue.

I'll do a quick PR to fix the example.

@ceceliacreates
Copy link
Author

You have to remove the <NuxtLayout> tag from your app.vue.

I'll do a quick PR to fix the example.

Thank you!! That worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants