Add blog post and support pubDate/tags
Add new post "After the Silence". Update content schema to use pubDate and include tags (default empty). Update blog listing, post page and start page to use pubDate, render tag lists, and compute/show up to two related posts by tag overlap. Misc formatting and small display tweaks.
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import { z, defineCollection } from 'astro:content';
|
||||
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),
|
||||
}),
|
||||
type: "content",
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
pubDate: z.coerce.date(),
|
||||
tags: z.array(z.string()).default([]),
|
||||
draft: z.boolean().optional().default(false),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { blog };
|
||||
|
||||
Reference in New Issue
Block a user