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

Unexpected non-props attributes falling-through when using ContentRenderer #2208

Closed TechAkayy closed 1 year ago

TechAkayy commented 1 year ago

Environment

Nuxi 3.6.5 1:03:30 PM 1:03:30 PM RootDir: /Users/techakayy/Templates/happy-paws-with-nuxt-tailwindcss 1:03:30 PM Nuxt project info: (copied to clipboard) 1:03:30 PM


Reproduction

https://github.com/pinegrow/happy-paws-with-nuxt-tailwindcss

The warnings are thrown only during development. In prod build, the document seems to render fine, https://happy-paws-with-nuxt-tailwindcss.netlify.app/, though the warning makes us wonder if we have got something wrong. Please advise me of any incorrect usage in the below explained context.

Describe the bug

  1. Clone the above repo, install dependencies, and start dev-server npm run dev
  2. Open app in browser, and have browser devtools console open
  3. Navigate to a blog post (under hamburger menu), for eg. http://localhost:3000/blog/vue-3-3
  4. The following unexpected warnings are thrown
image

Additional context

In pages/blog/[...slug].vue, I'm using the ContentRenderer component to render a document coming from a query. I'm not passing any classes to this component, just the post (second screenshot).

image

image

Logs

Thanks for looking into this.
nobkd commented 1 year ago

This was caused by <ProseCode> (see #2111) and should theoretically be fixed in edge channel (see #2187 with this general change https://github.com/nuxt/content/pull/2121#issuecomment-1609241347)

TechAkayy commented 1 year ago

Thxs bunch for the update 😀

farnabaz commented 1 year ago

Fixed in 2.8.

TechAkayy commented 1 year ago

Thank u 🙏🏾