--- /** * The landing's "From the blog": one featured post (pinned, else newest) with * its image and topic, and the two most recent beside it. Renders nothing when * there are no posts. */ import StarChartArt from "@gk/ui/components/StarChartArt.astro"; import { slugify } from "@gk/schema"; import { blogStrip, readMinutes } from "../../lib/home.ts"; import { formatDate, mediaSrc, type SiteIndex } from "../../lib/site.ts"; interface Props { site: SiteIndex; } const { site: s } = Astro.props; const { featured, recent } = blogStrip(s); const topicHref = (topic: string) => `/blog/topic/${slugify(topic)}`; --- { featured && (

From the blog

All articles
{ recent.length > 0 && (
{recent.map((p) => ( ))}
) }
) }