nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.12k stars 623 forks source link

Layout component rendering is duplicated #2757

Open linpengteng opened 2 months ago

linpengteng commented 2 months ago

Environment

Reproduction

look: https://stackblitz.com/edit/github-5hgwqx?file=layouts%2Fcustom.vue,content%2Fabout.md,nuxt.config.ts,content%2Findex.md

image

Describe the bug

Layout component rendering is duplicated~

Additional context

No response

Logs

No response

linpengteng commented 2 months ago

About #1722

linpengteng commented 2 months ago

I tried it locally and found that even if app.vue does not exist, Nuxt seems to provide app.vue as a virtual file.

  <template>
    <NuxtLayout>
      <NuxtPage />
    </NuxtLayout>
  </template>
linpengteng commented 2 months ago

create app.vue in nuxt project, it works normally.

// app.vue

  <template>
      <NuxtPage />
  </template>
github-actions[bot] commented 1 week ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.