Astro: created post displays in local environment but won't show after deploy / on production

Production: https://heyitworks.tech/

Behavior experienced:

  • Created a new blog in my Astro project (type: .md).
  • Verified that blog displayed locally (on dev server)

Then:

  • Deployed to Netlify

Deploy appeared to have gone successfully / output shows the new file being parsed.

However:

The new post doesn’t display on production. Its URL can be visited directly but it’s not visible on any of the post index pages (homepage, post archive).

Did you try astro build && astro preview` locally?

I’ve tried running npm run dev, and everything works fine, but when I deploy to Netlify, the blogs don’t show up. The same issue occurs when I run astro build && astro preview locally—no blogs are displayed. I’m not sure what’s causing this problem. How can I debug it?

So it’s a problem with your setup, not Netlify.