#Render Content

1 messages ยท Page 1 of 1 (latest)

dense nebula
#

Hey Edouard ๐Ÿ‘‹ I think this may be a syntax issue, you can try something like this instead: ```ts
{ posts.map(({ Content }) =>
<Content />
)}

dense nebula
#

Ahh my bad! I saw Astro.glob and forgot you asked about Content Collection, here is an example using Content Collections: ```tsx
{ posts.map(async (post) => {
const { Content } = await post.render()
return <Content />
}}

#

I always recommend using Content Collections, Astro.glob() is an older API that has issues with script/style leaking which can be very annoying to deal with

#

Also Content Collection has type safe frontmatter which makes it a lot safer to use

#

Oops! I forgot to add async to my example: (async (poast) => {

#

houston_celebrate No Problem!