Scaffold Astro 5 project with static output and i18n-ready content collections
This commit is contained in:
23
src/content/config.ts
Normal file
23
src/content/config.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { defineCollection, z } from 'astro:content';
|
||||
|
||||
// Scaffold only — no entries yet. Added now so future blog/docs work is pure content, not refactor.
|
||||
const blog = defineCollection({
|
||||
type: 'content',
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
publishedAt: z.date(),
|
||||
draft: z.boolean().default(true),
|
||||
}),
|
||||
});
|
||||
|
||||
const docs = defineCollection({
|
||||
type: 'content',
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
order: z.number().default(99),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { blog, docs };
|
||||
0
src/content/en/.gitkeep
Normal file
0
src/content/en/.gitkeep
Normal file
Reference in New Issue
Block a user