Blooper: Hardcoded Content Links cause 404s
The Bug
UI navigation links were hardcoded to specific content markdown file paths. When those markdown files were later renamed or reorganized, the hardcoded links silently broke, resulting in 404 errors.
The Fix
Instead of hardcoding static paths, resolve links dynamically. Load the content structure using a query collection, and use .find() with partial substring matching to auto-detect the current valid path for the intended page.
The Rule
Never hardcode internal content paths in UI components. Always derive them dynamically from the content source of truth to ensure resilience against file renaming.
Comments
Blooper: The Disappearing Cloudflare Variables
Blooper: The Disappearing Cloudflare Variables
Why environment variables added via the Cloudflare dashboard kept vanishing after deployment.
Blooper: The Invisible SEO
Blooper: The Invisible SEO
How missing production environment variables caused our app to aggressively de-index itself.
