--- import '@styles/prose.css'; import { render } from 'astro:content'; import { listPosts } from '@lib/content.ts'; import BaseLayout from '@layouts/BaseLayout.astro'; // return all posts in dev, only non-draft in prod const entries = await listPosts(); const posts = await Promise.all(entries.map(async entry => { const { remarkPluginFrontmatter } = await render(entry); return { ...entry, remarkPluginFrontmatter }; })); --- All Posts {posts.map( (p, idx) => {idx > 0 && } {p.data.title} {p.data.draft && Draft} {p.remarkPluginFrontmatter.description} )}
{p.remarkPluginFrontmatter.description}