quarto-dev / quarto-dev/quarto-cli
Should `book` support "Website Drafts"?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
The 1.5 Website Drafts feature adds drafts and draft-mode to the website key.
Since book inherits the base-website schema you can add drafts and draft-mode to book without any warnings, but those options aren't currently respected by books (more details on this below).
I think there are two options:
- Support
draftsanddraft-modeforbook - Make
draftsanddraft-modeawebsiteonly thing, and explicitly disallow for books.
Issues with book and Website Drafts
Set Up:
quarto create book book-drafts
quarto render --to html
draft-mode isn't respected
Set draft: true in intro.qmd:
---
draft: true
---
And draft-mode: visible in _quarto.yml
book:
draft-mode: visible
...
Expected: _book/intro.html should be in book sidebar navigation.
Actual: _book/intro.html isn't in book sidebar navigation.
Try draft-mode: gone in _quarto.yml
book:
draft-mode: gone
...
Expected: _book/intro.html should be empty.
Actual: _book/intro.html has full content (along with Draft banner).
drafts isn't respected
Remove draft: true from intro.qmd and instead add drafts to _quarto.yml:
book:
drafts:
- intro.qmd
Expected: Should be the same behavior as having the draft: true option in intro.qmd
Actual: With draft-mode: gone, intro.html appears as though it isn't a draft at all.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with quarto create book book-drafts and quarto render --to html, using _quarto.yml and intro.qmd. Trace how book rendering handles draft-mode and drafts, comparing the existing website behavior; done means the chosen support or rejection is consistent for book navigation, empty output, and draft listing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100