#Markdown in YAML-generated content collection

3 messages · Page 1 of 1 (latest)

opaque spindle
#

I've seen a lot of docs about loading markdown files into content collections.

But my use case is different: I have a content collection generated from a single YAML file containing an array of items.

And some of the item fields in turn contain content that I want to parse as Markdown. Is that possible with a built-in Astro API?

Or would I need to treat the markdown as external markdown?

thorn oxide
#

Hi! You can definitely load the file using a file loader. Unfortunately, if I remember correctly Astro does not expose its markdown renderer at the moment, so you'll have to handle that yourself.

opaque spindle
#

got it, thanks!