fix(ci): proper types

This commit is contained in:
Barrett Ruth 2025-11-09 14:53:56 -05:00
parent 28c3cfcf6d
commit 16850cf468
9 changed files with 607 additions and 15 deletions

View file

@ -1,12 +1,27 @@
---
import BaseLayout from "../layouts/BaseLayout.astro";
import { sortItem } from "../utils/sort.js";
import { getCollection } from "astro:content";
import { getCollection, type CollectionEntry } from "astro:content";
import type { PostCollection } from "../types";
const title = "Barrett Ruth";
const CATS = ["algorithms", "software", "meditations", "autonomous-racing"];
const CATS: PostCollection[] = [
"algorithms",
"software",
"meditations",
"autonomous-racing",
];
const postsByCategory = {};
type PostData = {
id: string;
slug: string;
data: {
title: string;
date: string | null;
};
};
const postsByCategory: Record<string, PostData[]> = {};
for (const c of CATS) {
const entries = await getCollection(c);
entries.sort(sortItem);