--- import { getCollection } from "astro:content" import PageLayout from "@layouts/PageLayout.astro" import TopLayout from "@layouts/TopLayout.astro" import BottomLayout from "@layouts/BottomLayout.astro" import FilteredList from "@components/FilteredList" import { BLOG } from "@consts" import { byDateDesc } from "@lib/content" import { parseFilterParams } from "@lib/filters" const entries = await getCollection("blog", ({ data }) => !data.draft) // Only the fields the cards and the filters read. `content` was serialized into // the island's props on every request and never matched against — the markdown // body is the single largest thing on this page. const posts = entries .sort(byDateDesc) .map((entry) => ({ id: entry.id, title: entry.data.title, summary: entry.data.summary, date: entry.data.date.toISOString(), tags: entry.data.tags, })) // Frontmatter runs on the server, so the initial filter state has to come from // the request URL rather than `window.location` (see src/pages/search/index.astro). const initial = parseFilterParams(Astro.url.searchParams) ---
{BLOG.TITLE}