Programmatic Publishing with Contentlayer

Salarybueno Team


Salarybueno Team
Why we changed
We now publish new blog posts from local MDX files in the repository.
This gives us:
- Version-controlled content in Git
- Programmatic generation workflows
- Easier automation for recurring reports and calculators
What stayed the same
Existing posts stored in Sanity are still live and still resolvable at the same /posts/[slug] URLs.
This keeps existing SEO history and backlinks intact.
Hybrid model
The blog now merges two sources:
- Sanity posts (legacy + editorial archive)
- Contentlayer MDX posts (new programmatic content)
If a slug exists in both sources, the Sanity version wins by design to protect existing indexed pages.
