Skip to content

duplicated layout when using document driven with multiple layouts #1722

@Zerro97

Description

@Zerro97

Environment

  • Operating System: Mac
  • Node Version: v16.16.0
  • Nuxt Version: 3.0.0
  • Package Manager: [email protected]

Reproduction

Reproduction Link: Link

Describe the bug

  1. Put NuxtLayout component in app.vue
<template>
  <div>
    <NuxtLayout>
      <NuxtPage />
    </NuxtLayout>
  </div>
</template>
  1. Enable document driven feature in nuxt.config.ts
  2. Create 2 layouts, 1 for default layout, 1 for custom layout
  3. Create 2 markdown file and specify the layouts made in previous step
---
layout: default
---
---
layout: custom
---

When using layout binding as instructed here, instead of replacing the default layout with the custom layout, custom layout is put within the <slot /> of the default layout (so two layouts showing).

Additional context

Might be related to this PR from nuxt/framework.

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions