build: bump Astro to v4.14.2 & use content layer (#355)

Bump Astro from v4.13 to v4.14.2 and use experimental
content layer api.
This commit is contained in:
Sat Naing
2024-08-19 12:53:58 +07:00
committed by GitHub
parent 2b617b20a3
commit dab61b3714
4 changed files with 283 additions and 45 deletions
+3 -1
View File
@@ -1,8 +1,10 @@
import { SITE } from "@config";
import { glob } from "astro/loaders";
import { defineCollection, z } from "astro:content";
const blog = defineCollection({
type: "content",
type: "content_layer",
loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }),
schema: ({ image }) =>
z.object({
author: z.string().default(SITE.author),