--- import type { CollectionEntry } from 'astro:content' import LeftSection from './blocks/LeftSection.astro' import RightSection from './blocks/RightSection.astro' const { blogs } = Astro.props interface Props { blogs: CollectionEntry<'posts'>[] } const posts = blogs.slice(0, 5) --- { posts.map((b, index) => index % 2 === 0 ? ( ) : ( )) }