diff --git a/src/pages/_index.astro b/src/pages/_index.astro new file mode 100644 index 0000000..6b2d1cf --- /dev/null +++ b/src/pages/_index.astro @@ -0,0 +1,71 @@ +--- +import BaseLayout from "../layouts/BaseLayout.astro"; +import { sortItem } from "../utils/sort.js"; +import { getCollection } from "astro:content"; +import type { PostCollection } from "../types"; + +const title = "Barrett Ruth"; +const CATS: PostCollection[] = [ + "algorithms", + "software", + "meditations", + "autonomous-racing", +]; + +type PostData = { + id: string; + slug: string; + data: { + title: string; + date: string | null; + }; +}; + +const postsByCategory: Record = {}; +for (const c of CATS) { + const entries = await getCollection(c); + entries.sort(sortItem); + postsByCategory[c] = entries.map((e) => ({ + id: `${c}/${e.slug}.mdx`, + slug: e.slug, + data: { + title: e.data.title ?? e.slug, + date: e.data.date ?? null, + }, + })); +} +--- + + + + + + +
+ +
+
+ + + +
diff --git a/src/pages/death.astro b/src/pages/death.astro deleted file mode 100644 index e68ff0c..0000000 --- a/src/pages/death.astro +++ /dev/null @@ -1,68 +0,0 @@ ---- -import BaseLayout from "../layouts/BaseLayout.astro"; -const title = "my father"; ---- - - -
- Philip Matthew Ruth -
- rip philip matthew ruth
- february 8, 1967 – c. december 2, 2025 -
-
- gary wray
- waiting in line, 2021 -
-
- -
diff --git a/src/pages/index.astro b/src/pages/index.astro index 6b2d1cf..f1ed7f4 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,71 +1,68 @@ --- import BaseLayout from "../layouts/BaseLayout.astro"; -import { sortItem } from "../utils/sort.js"; -import { getCollection } from "astro:content"; -import type { PostCollection } from "../types"; - -const title = "Barrett Ruth"; -const CATS: PostCollection[] = [ - "algorithms", - "software", - "meditations", - "autonomous-racing", -]; - -type PostData = { - id: string; - slug: string; - data: { - title: string; - date: string | null; - }; -}; - -const postsByCategory: Record = {}; -for (const c of CATS) { - const entries = await getCollection(c); - entries.sort(sortItem); - postsByCategory[c] = entries.map((e) => ({ - id: `${c}/${e.slug}.mdx`, - slug: e.slug, - data: { - title: e.data.title ?? e.slug, - date: e.data.date ?? null, - }, - })); -} +const title = "barrett ruth"; --- - - - - - -
- -
+ +
+ Philip Matthew Ruth +
+ rip philip matthew ruth
+ february 8, 1967 – c. december 2, 2025 +
+
+ gary wray
+ waiting in line, 2021 +
- - - +