feat: add draft frontmatter flag to withhold guides from publishing - #1027
Open
LeaVerou wants to merge 1 commit into
Open
feat: add draft frontmatter flag to withhold guides from publishing#1027LeaVerou wants to merge 1 commit into
draft frontmatter flag to withhold guides from publishing#1027LeaVerou wants to merge 1 commit into
Conversation
This was referenced Jul 21, 2026
Guides can set `draft: true` (or any truthy value, e.g. `draft: future`) in frontmatter to be excluded from all distribution (search index, README, megaskill) without deleting them. The value is intentionally not validated. Evals are unaffected — a draft guide with eval artifacts still runs. `isPublished` (real content + not draft) is computed once as a guide-inventory property, consumed by all three build paths. Part of #1017
LeaVerou
force-pushed
the
guide-draft-flag
branch
from
July 22, 2026 00:51
06fb1a3 to
fbf6231
Compare
rviscomi
approved these changes
Aug 6, 2026
rviscomi
left a comment
Member
There was a problem hiding this comment.
Supportive of this change so LGTMing but it'd be good to get a technical review from @paulirish
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1017
Adds:
draftfrontmatter option. Guides can setdraft: true(or any truthy value, e.g.draft: future) in frontmatter to be excluded from all distribution (search index, README, megaskill) without deleting them. Evals are unaffected — a draft guide with eval artifacts still runs.The value is intentionally not validated (per Frontmatter option to prevent guides from being published #1017 (comment) )
draftandisPublishedproperties inGuideInventory.isPublished(real content + not draft) is computed once as a guide-inventory property, consumed by all three build paths.I also did a little minor refactoring to make the logic and dependencies in
inventoryGuide()easier to follow, but I can revert it if needed.Note: I kept the logic as-is to avoid regressions, but it's a little confusing that
isStubis true even for a fully fleshed out guide…