Add blog via Astro content collections
Introduce blog support: content collection schema, listing and post routes, and a sample Markdown post. Update docs and TODO; add blog assets dir and adjust color variables in docs. Also set absolute_redirect off in nginx.conf for container routing.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { z, defineCollection } from 'astro:content';
|
||||
|
||||
const blog = defineCollection({
|
||||
type: 'content',
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
date: z.coerce.date(),
|
||||
description: z.string(),
|
||||
draft: z.boolean().optional().default(false),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { blog };
|
||||
Reference in New Issue
Block a user