summaryrefslogtreecommitdiff
path: root/apps/web/content-collections.ts
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-04-15 02:05:41 +0200
committerMaze Winther <mazewinther@gmail.com>2026-04-15 02:05:41 +0200
commit370944f443cb997ef71dda0c8ef6f4e92bea87d7 (patch)
tree7a841c0291adb7c261f692121b81a3e9d1a9c615 /apps/web/content-collections.ts
parentc839db92341b9058eac3ff92cc586df060b768da (diff)
downloadopencut-370944f443cb997ef71dda0c8ef6f4e92bea87d7.tar.gz
feat: new-release notice and colocate changelog under domain
Diffstat (limited to 'apps/web/content-collections.ts')
-rw-r--r--apps/web/content-collections.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/web/content-collections.ts b/apps/web/content-collections.ts
index bde2ba94..0fdd7234 100644
--- a/apps/web/content-collections.ts
+++ b/apps/web/content-collections.ts
@@ -3,7 +3,7 @@ import { z } from "zod";
const changelog = defineCollection({
name: "changelog",
- directory: "content/changelog",
+ directory: "src/lib/changelog/entries",
include: "*.md",
schema: z.object({
content: z.string(),
@@ -12,6 +12,7 @@ const changelog = defineCollection({
published: z.boolean().default(true),
title: z.string(),
description: z.string().optional(),
+ summary: z.string().optional(),
changes: z.array(
z.object({
type: z.string(),
@@ -25,7 +26,8 @@ const changelog = defineCollection({
const sorted = [...publishedDocs].sort((a, b) =>
b.version.localeCompare(a.version, undefined, { numeric: true }),
);
- const isLatest = doc.published !== false && sorted[0]?.version === doc.version;
+ const isLatest =
+ doc.published !== false && sorted[0]?.version === doc.version;
return { ...doc, isLatest };
},
});