Skip to content

Commit ef47fce

Browse files
author
MerchantPug
committed
Fix blog + tweaks.
1 parent ce480eb commit ef47fce

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/content.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import { z, defineCollection } from "astro:content";
22
import { glob } from "astro/loaders";
33

44
const blog = defineCollection({
5-
loader: glob({ pattern: "**/*.md", base: "./src/data/blog" }),
5+
loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }),
66
schema: z.object({
77
title: z.string(),
88
author: z.string(),
99
author_avatar_url: z.string(),
10-
date: z.date(),
11-
edited_at: z.date().optional(),
10+
date: z.string().transform((str) => new Date(str)),
11+
edited_at: z.string().transform((str) => new Date(str)).optional(),
1212
description: z.string(),
1313
tags: z.array(z.string()).optional(),
1414
permalink: z.string(),

src/content/blog/garden_timeline.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Mod Garden - Garden Timeline"
33
author: "Calico"
44
author_avatar_url: "https://cdn.modrinth.com/user/84zsGbft/ddfa5d3d49c0c2c4972542bd9a305c1d78f70ac1.png"
55
date: "2025-01-26"
6+
edited_at: "2025-04-11"
67
description: "The rundown of a Mod Garden event timeline."
78
tags:
89
- meta
@@ -23,7 +24,7 @@ Registration is open during this phase and the development phase.
2324

2425
## The Development Phase
2526

26-
**Timeframe: 56 days/8 weeks**
27+
**Timeframe: 60 days/8 weeks**
2728

2829
The development phase is where participants will create their mods. Do whatever it takes within the timeframe.
2930
You are allowed to submit multiple.

src/pages/blog/[post].astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ const { Content } = await render(post);
4242
/>
4343
<span>{post.data.author}</span>
4444
<span>•</span>
45-
<span>{post.data.date}</span>
45+
<span>{post.data.date.toDateString()}</span>
4646
{
4747
post.data.edited_at && (
4848
<>
4949
<span>•</span>
50-
<span>Edited: {post.data.edited_at}</span>
50+
<span>Edited: {post.data.edited_at.toDateString()}</span>
5151
</>
5252
)
5353
}

0 commit comments

Comments
 (0)