Closed 7iomka closed 2 months ago
Just pass data
prop to markdown renderer.
In your case, pass doc
as data:
<ContentRendererMarkdown v-if="doc.excerpt" :value="doc.excerpt" :data="doc"/>
Just pass
data
prop to markdown renderer.In your case, pass
doc
as data:<ContentRendererMarkdown v-if="doc.excerpt" :value="doc.excerpt" :data="doc"/>
Wow - thanks! From the docs this is very unclear, because I don't fount any example like that.
Indeed it is not clear in docs. Feel free to drop a PR to update docs if you want to :)
Environment
Build Modules: -
Reproduction
https://stackblitz.com/edit/github-yzzmyf?file=pages%2Findex.vue,content%2Fprojects%2Fproj1.md
Describe the bug
If we try to use
ContentRendererMarkdown
for some field ofContentDoc
with type ofParsedContent
or it partial, we see that data-bindings from frontmatter is broken, and all variables becomes strings values, and we see warnings for this in console as well. So, how to render the parts of data withContentRendererMarkdown
without this behavior? Or this is expected?Additional context
No response
Logs
No response