Add drafts staging area for work-in-progress posts#11
Merged
Conversation
# Problem There was no safe place to keep in-progress drafts locally without risking them leaking into the build output or getting committed to the repo accidentally. # Solution Adds `_posts/drafts/` as a gitignored, build-skipped staging area. A new `EXCLUDED_THEME_DIRS` set in `build.js` tells `listThemeDirs()` to ignore the folder entirely, so anything sitting in drafts never renders, never appears on the homepage, and never generates a public `/drafts/` directory on the site. The workflow is: drop a draft into `_posts/drafts/` to work on it locally, then move it into a real `_posts/<theme>/` folder when it's ready to publish. At that point it builds normally with no extra steps. CLAUDE.md is updated to document the convention alongside the rest of the `_posts/` architecture notes. # Notes The exclusion is name-based (`"drafts"`), not path-based, so a theme folder literally named `drafts` would also be excluded. That's an acceptable tradeoff given the convention is now documented.
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.
Problem
There was no safe place to keep in-progress drafts locally without risking them leaking into the build output or getting committed to the repo accidentally.
Solution
Adds
_posts/drafts/as a gitignored, build-skipped staging area. A newEXCLUDED_THEME_DIRSset inbuild.jstellslistThemeDirs()to ignore the folder entirely, so anything sitting in drafts never renders, never appears on the homepage, and never generates a public/drafts/directory on the site.The workflow is: drop a draft into
_posts/drafts/to work on it locally, then move it into a real_posts/<theme>/folder when it's ready to publish. At that point it builds normally with no extra steps.CLAUDE.md is updated to document the convention alongside the rest of the
_posts/architecture notes.Notes
The exclusion is name-based (
"drafts"), not path-based, so a theme folder literally nameddraftswould also be excluded. That's an acceptable tradeoff given the convention is now documented.