#Render Markdown not coming from markdown file
1 messages · Page 1 of 1 (latest)
Based on the information provided in the extracts, it seems like you're trying to render Markdown content that is not coming from a Markdown file but from a data collection. However, the extracts do not provide a direct solution for this specific scenario.
Astro's content collections are primarily designed to work with Markdown and MDX files. The getEntry() and getCollection() functions are used to query these files and return content entries. Once queried, you can render Markdown and MDX entries to HTML using the entry render() function property. This gives you access to rendered content and metadata, including a <Content /> component and a list of all rendered headings (source (https://docs.astro.build/en/guides/content-collections#rendering-content-to-html)).
In your case, you're querying a data collection, not a Markdown or MDX file. The render() function and <Content /> component might not work as expected with data collections.
If your bloc1_text, bloc2_text, and bloc3_text properties contain Markdown content, you might need to use a Markdown parser to convert this content to HTML. Unfortunately, the provided extracts do not contain information on how to do this with Astro.