You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Nuxt Content v2 to render markdown files from my content folder. Currently, I'm fetching the content like this:
const{ data }=awaituseAsyncData(`content-${path}`,()=>{returnqueryContent().where({_path: path}).findOne()})
This works well for rendering with the ContentDoc component. However, I need to pass the raw markdown content to a child component.
I tried to pass it like this:
<ChildComponent :markdown-post="data.body" />
But data.body doesn't contain the raw markdown. It seems to be already parsed or in a different format.
Is there a way to access the original, unparsed markdown content of a document fetched with queryContent()? I need this to pass the raw markdown to a child component for custom processing.
Any help or guidance would be greatly appreciated. Thank you!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using Nuxt Content v2 to render markdown files from my
content
folder. Currently, I'm fetching the content like this:This works well for rendering with the
ContentDoc
component. However, I need to pass the raw markdown content to a child component.I tried to pass it like this:
But
data.body
doesn't contain the raw markdown. It seems to be already parsed or in a different format.Is there a way to access the original, unparsed markdown content of a document fetched with
queryContent()
? I need this to pass the raw markdown to a child component for custom processing.Any help or guidance would be greatly appreciated. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions