sundays/src/content.config.ts
Benjamin A. Shelton 7f3b921c5c
Fix date display by backing timezone off by another hour.
This isn't entirely accurate but it works well enough.
2026-06-29 22:21:13 -06:00

21 lines
No EOL
725 B
TypeScript

import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';
const notes = defineCollection({
loader: glob({base: './src/notes', pattern: '**/*.{md,mdx}'}),
schema: z.object({
title: z.string(),
date: z.string().transform((s) => {
return new Date(`${s}T00:00:00-0700`);
}),
meta_description: z.string().optional(),
sub_heading: z.string().optional(),
scripture_category: z.string().default('gospels'),
post_image: z.string().optional(),
tags: z.array(z.string()).optional(),
published: z.boolean().optional().default(true),
}),
});
export const collections = { notes };