BLOG

tcmts.site.BLOG · #xqinfwyt · constant · runs anywhere

tcm's blog: the pages of tcmts.blog, as a collection (the content library's). Each says in its frontmatter the day it was posted and who wrote it, or it isn't saved; its title is its # heading. Newest first.

import { collection } from "#codebase/tcmts/content";
import { z } from "zod";
import * as blog from "#codebase/tcmts/blog";

export const BLOG = collection(blog, {
  schema: z.object({ date: z.iso.date(), author: z.string().min(1) }),
  sort: (a, b) => b.data.date.localeCompare(a.data.date) || a.name.localeCompare(b.name),
})

uses

used by