What version of astro are you using?
2.0.2
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Mac
Describe the Bug
draft: true in frontmatter of pages is respected, but in frontmatter of collections it isn't when generating static site.
As a workaround one can create a filter when calling getCollection and also getStaticPath
await getCollection("post", ({ data }) => import.meta.env.DEV || !data?.draft))
But that's not consistent with pages (where ItJustWorks) or with user expectations
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-tlp8uq
Participation
What version of
astroare you using?2.0.2
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Mac
Describe the Bug
draft: truein frontmatter of pages is respected, but in frontmatter of collections it isn't when generating static site.As a workaround one can create a filter when calling
getCollectionand alsogetStaticPathBut that's not consistent with pages (where ItJustWorks) or with user expectations
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-tlp8uq
Participation