menu_book Course Curriculum (Astro) expand_more
Components
Pages & Routing
Layouts & Content
Styling
Islands
Data & Server
Rendering
Content collections
Learn Content collections in Astro with a dedicated explanation, topic-specific example, edge guidance, and mastery check.
12 min read
•
Beginner
Advertisement
astro-023.astro
astro
import { defineCollection, z } from "astro:content";
const posts=defineCollection({schema:z.object({title:z.string(),published:z.date()})});
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content