Replies: 1 comment 5 replies
-
Oh, here's the list of package.json dependencies to identify my Astro and Starlight versions:
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, I've recently started using Starlight to develop a new content project. My workflow involves planning the structure first, creating stub pages based on the structure, and then iteratively adding content to the stubs.
The
draft: true
frontmatter property targets this scenario, but the problem is it seems to break the production build instead of excluding draft articles from it. If any of my articles hasdraft: true
set, the build process (astro build
) fails with the following message and stack trace:This particular draft article that the build is failing on is at
/src/content/docs/guides/sample.md
and has the following frontmatter:Here's the definition of the draft article in
astro.config.mjs
:However, the problem is not specific to this particular article and is reproduced with any article that has
draft: true
in frontmatter.I would expect that if an article has
draft: true
, it's excluded from the production build along with its sidebar entry.The current behavior kind of defeats the purpose of
draft: true
as prevents me from building and deploying when I have one or more articles marked as draft.Is there something I'm doing wrong? Are any workarounds available to make it work the way I expect it to?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions