Content Layer API
// src/content.config.ts
import { defineCollection, z } from "astro:content";
import { glob } from "astro/loaders";
const blog = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./content/blog" }),
schema: z.object({
title: z.string(),
date: z.date(),
}),
});Server Islands
---
import UserGreeting from "../components/UserGreeting.astro";
---
<html>
<h1>정적 콘텐츠</h1>
<!-- 이 부분만 서버에서 동적 렌더링 -->
<UserGreeting server:defer />
</html>페이지 대부분은 정적으로, 일부만 동적으로 렌더링합니다.
댓글 0