Open imsus opened 6 years ago
ah I think something like this would work for you:
---
title: This is a post
compileTemplate: true
---
<Image :layout="page.attributes.layout" />
https://github.com/egojump/peco/blob/master/docs/using-vue-template-in-markdown.md
Imagine we have this kind of content:
Morphing component
We have this
<Image />
component inside markdown content. Imagine that the component will change based on the layout provided from front matter.For Example: Image.vue
The question is, how to retrieve theme object from frontmatter? So this code will work in any content.
<Image layout="theme.name" src="~static/image1.jpg" />