N
Nuxt10mo ago
sirlan

Nuxt Content split Markdown file

When using Nuxt Content, is there a practical way to split an .md file into parts that can be used independently? I know the <!--more--> thing for excerpts, but is there a way to do it for an arbitrary number of named sections something like (non real code just to explain what I mean)
// content/thing.md
--- part-1
something...
--- part-2
something else...
// content/thing.md
--- part-1
something...
--- part-2
something else...
// pages/thing/[part].vue
<template>
<ContentRenderer :value="thing[part]">
...
</ContentRenderer>
</template>
// pages/thing/[part].vue
<template>
<ContentRenderer :value="thing[part]">
...
</ContentRenderer>
</template>
and going to localhost/thing/part-1 would show 'something...'
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server