Tag: MDX
4 posts

Turning a Prose Style Guide into Zod Build Checks
Character limits, canonical tags, and em dash rules encoded as a Zod discriminated union. The script caught a duplicate cover image on its first run.

Killing Split-Brain Content with One Metadata Export
How moving cover images, titles, and excerpts into MDX metadata eliminated 680 lines of duplicate records and the silent drift between them.

Building an Auto-Generated Table of Contents with Scroll Spy
Extracting headings from rendered MDX, tracking reading position with IntersectionObserver, and adapting between a sticky sidebar and a mobile bottom sheet.

Building a Unified Content Pipeline with Next.js and MDX
How a single content registry replaces duplicated per-type data files, cutting the cost of adding new content types from 6+ files to 3.