Reputation: 11
I have a markdown file with YAML frontmatter. In the frontmatter, I want to refer to a component such as:
---
title: Hello world
component: <component-a></component-a>
---
Lorem ipsum...
I want to refer to this in the vue file via {{page.component}}. Is there a way to have vue recognize this? Right now, it just spits out , instead of the actual component. If it helps, I am using Nuxt.
Upvotes: 1
Views: 121
Reputation: 1
Try to use component
to render it like :
<component :is="page.component" />
Upvotes: 1