@nuxt/content: v1.2.0
nuxt: v2.12.0
https://codesandbox.io/s/nuxtcontent-demo-pfror?file=/content/index.md
Any markdown with an image
`

I would not expect markdown images to be wrapped in paragraph tags
Markdown images are wrapped in
tags.
This is an aspect of Markdown, not nuxt/content. Content uses remark plugins to process Markdown text - it looks like there's a plugin called remark-unwrap-images that does exactly what you're looking for.
Here's the whole list of remark plugins, for reference. And here's the Configuration page of the nuxt/content documentation on how to enable them.
Thanks @thely
For reference on adding remark plugins
yarn add remark-unwrap-images or npm i remark-unwrap-images
And then add this to your nuxt.config.js
content: {
markdown: {
plugins: ['remark-unwrap-images']
}
},
Does this work? I'm using the remark-unwrap-images plugin and my img tag is still wrapped in a p tag.
@shash7 yeah it's working for me
Strange. Its not working for me.
@shash7 , what version of nuxt/content are you using? Support for Remark plugins was only added in 1.2.0, which came out last week.
I'm using 1.0.0
Guess that explains the issue.
Most helpful comment
This is an aspect of Markdown, not nuxt/content. Content uses remark plugins to process Markdown text - it looks like there's a plugin called remark-unwrap-images that does exactly what you're looking for.
Here's the whole list of remark plugins, for reference. And here's the Configuration page of the nuxt/content documentation on how to enable them.