> Astro Content Collections
Manage content in Astro with type-safe collections, MDX, and static generation.
fetch
$
curl "https://skillshub.wtf/skillshub-team/catalog-batch5/astro-content?format=md"SKILL.md•Astro Content Collections
Astro Content Collections
Define Collection
// src/content/config.ts
import { defineCollection, z } from 'astro:content';
const blog = defineCollection({
type: 'content',
schema: z.object({ title: z.string(), date: z.date(), tags: z.array(z.string()).optional() }),
});
export const collections = { blog };
Content Files
---
title: My First Post
date: 2024-01-15
tags: [typescript, astro]
---
# Hello World
Content here...
Query
---
import { getCollection } from 'astro:content';
const posts = await getCollection('blog');
const sorted = posts.sort((a, b) => b.data.date - a.data.date);
---
{sorted.map(post => <a href={`/blog/${post.slug}`}>{post.data.title}</a>)}
> related_skills --same-repo
> Nix Dev Shells with direnv
Auto-activate reproducible dev environments with Nix flakes and direnv.
> Dagger with GitHub Actions
Run Dagger CI/CD pipelines in GitHub Actions for portable, testable builds.
> Bun + Hono API
Build fast APIs with Bun runtime and Hono framework.
> Deno Fresh Framework
Build full-stack web apps with Fresh on Deno. Islands, routes, and zero runtime overhead.
┌ stats
installs/wk0
░░░░░░░░░░first seenMar 18, 2026
└────────────