-
{
posts.map((post) => (
-
{post.data.title}
))
}
--- import BaseHead from '../../components/blog/BaseHead.astro'; import Header from '../../components/blog/Header.astro'; import Footer from '../../components/blog/Footer.astro'; import FormattedDate from '../../components/blog/FormattedDate.astro'; import { getCollection } from 'astro:content'; import {SITE_TITLE, SITE_DESCRIPTION} from '../../consts'; export const prerender = false; const posts = (await getCollection('blog')).sort( (a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(), ); ---