Update IV

(GO HOME)

Created On: Tue, 24th January (2026)

Prev: phase-1/entry-005

The contents of this file are entirely MDX. So there’s no HTML in this section.

…uh. So apparently some characters blow up. Here’s an apostrophe: ’

Oh… even new lines are exploding… huh.

Wait… ellipses too? Oh wait is this a fancy typography sort of thing?

Well anyways. This one works with content collections too, so they’re kinda just automatically detecting files. I kinda prefer it over MDSVEX honestly.

content.config.ts
// 1. Import utilities from `astro:content`
import { defineCollection } from 'astro:content';
// 2. Import loader(s)
import { glob, file } from 'astro/loaders';
// 3. Import Zod
import { z } from 'astro/zod';
// 4. Define your collection(s)
const blog = defineCollection({
loader: glob({ pattern: "**/*.mdx", base: "./src/data/entries" }),
});
// 5. Export a single `collections` object to register your collection(s)
export const collections = { blog };

Y’know, dealing with code fences is a lot more pleasant now. Better than the CODE component at least.

genesis.astro (part)
---
const allBlogPosts = await getCollection('blog');
let data = await Promise.all(allBlogPosts.map(item => render(item)));
---
{
data.map(entry => <entry.Content/>)
}

Addendum I

Okay so, multiple things to address.

  1. I was dealing with layouts wrong. I need to put the content inside of the layout, I was just including it haphazardly. Which caused things to break.
  2. Because of that, we weren’t injecting the meta elements correctly.
  3. One of them defines the charset as unicode. Without that, everything was being encoded incorrectly.

Huge thanks to this video for helping. They’re basically just pointing to a GitHub issue, but frankly it still helped, and in an age where Google is garbage, we take what we can get.

One little side effect. This breaks the sorting. Since I was doing that manually. Which is partly why I also split this out into its own section. Calling it Genesis B for now.

Log Index