From 4d127a038bf768eded68aae3cfa5c1b12241bdac Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Fri, 27 Mar 2026 00:55:15 +0100 Subject: chore: normalize line endings --- apps/web/content-collections.ts | 66 ++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'apps/web/content-collections.ts') diff --git a/apps/web/content-collections.ts b/apps/web/content-collections.ts index a3455d80..b9904bf6 100644 --- a/apps/web/content-collections.ts +++ b/apps/web/content-collections.ts @@ -1,33 +1,33 @@ -import { defineCollection, defineConfig } from "@content-collections/core"; -import { z } from "zod"; - -const changelog = defineCollection({ - name: "changelog", - directory: "content/changelog", - include: "*.md", - schema: z.object({ - content: z.string(), - version: z.string(), - date: z.string(), - title: z.string(), - description: z.string().optional(), - changes: z.array( - z.object({ - type: z.string(), - text: z.string(), - }), - ), - }), - transform: async (doc, { collection }) => { - const allDocs = await collection.documents(); - const sorted = [...allDocs].sort((a, b) => - b.version.localeCompare(a.version, undefined, { numeric: true }), - ); - const isLatest = sorted[0]?.version === doc.version; - return { ...doc, isLatest }; - }, -}); - -export default defineConfig({ - content: [changelog], -}); +import { defineCollection, defineConfig } from "@content-collections/core"; +import { z } from "zod"; + +const changelog = defineCollection({ + name: "changelog", + directory: "content/changelog", + include: "*.md", + schema: z.object({ + content: z.string(), + version: z.string(), + date: z.string(), + title: z.string(), + description: z.string().optional(), + changes: z.array( + z.object({ + type: z.string(), + text: z.string(), + }), + ), + }), + transform: async (doc, { collection }) => { + const allDocs = await collection.documents(); + const sorted = [...allDocs].sort((a, b) => + b.version.localeCompare(a.version, undefined, { numeric: true }), + ); + const isLatest = sorted[0]?.version === doc.version; + return { ...doc, isLatest }; + }, +}); + +export default defineConfig({ + content: [changelog], +}); -- cgit v1.3.1