Skip to content

Is it possible to programatically render the same markdown as <<< from a Vue component? #735

Closed
@davestewart

Description

@davestewart

I ask as I'm loading in a file raw from a component in a theme...

const data = require('!raw-loader!./' + this.file + '.vue')
return md.renderInline('```vue\n\n' +data+ '\n```')

...but I want to just use the VuePress Markdown setup, which looks great.

Unfortunately, my attempt looks like the top half below.

How do I make it look like the result of <<< path/to/file.vue (the bottom half, below)?

image

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