-
Hello, folks 👋 this is my first time using Vue and Vitepress, but I have used MDX in the past. In Vitepress, how can you loop over an array of items and return markdown content so we can lean on features such as auto-generated heading anchors? Currently I have the following, which will render <script setup>
import { commands } from '$lib/cli-commands'
console.log(commands)
</script>
# Commands
<div v-for="(command, index) in commands" :key="index">
<h2>{{ command.name }}</h2>
</div> However I'd like to return markdown content to circumvent the need for re-rolling the anchors, something like this:
or
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
What the issue you're getting? Second one should work fine. |
Beta Was this translation helpful? Give feedback.
-
It looks like it is broken in at least 1.0.0-rc.36+.
Doesn't work. |
Beta Was this translation helpful? Give feedback.
What the issue you're getting? Second one should work fine.