Skip to content

Hello: the rebuilt site and how notes work

The first note on the rebuilt ryanrosenbaum.dev. What the notes section is for and how a post goes from MDX to the page.

·1 min read·site, meta

Notes are the long-form part of this site: technical and production writing, in the paper theme, with real code.

How a note is built

Each note is an MDX file under content/notes/. Frontmatter is validated with zod at build time, so a missing date or an over-long summary fails the build instead of shipping.

lib/content/index.ts
export const getAll = cache(async (collection) => {
  const files = await listFiles(collection)
  const entries = await Promise.all(files.map((f) => parseFile(collection, f)))
  return entries.filter(visible).sort((a, b) => b.frontmatter.date.localeCompare(a.frontmatter.date))
})
1fixture notemore to come

The first real notes are queued. Subscribe with the RSS feed if you want them as they land.