Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Discussion/Question] Can I pass props into my Markdown components and have them rendered within the Markdown component? #36

@cjholowatyj

Description

@cjholowatyj

Can I pass props into my Markdown components and have them rendered within the Markdown component? For example, would I be able to do something like...

<!-- Page.vue -->
<template>
    <MarkdownComponent :slogan="markdownSlogan"/>
</template>

<script setup>
import MarkdownComponent from 'markdown-component.md';
const markdownSlogan = "Here we grow again!";
</script>
<!-- markdown-component.md -->
# Title

## {{ props.slogan }}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus rutrum risus lacus, ...

If this functionality is already available, it is not clearly documented in the README.md. If it isn't already available Please consider this a feature request!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions