Skip to content

quarto preview does not override draft: true inherited from _metadata.yml #14456

@bryanpmayfield

Description

@bryanpmayfield

I have:

  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide

Bug description

When draft: true is set in a directory-level _metadata.yml, quarto preview at the site level produces blank pages instead of rendering them with a draft banner. The documentation states that regardless of draft-mode setting, quarto preview should render drafts as visible.

Steps to reproduce

  1. Create a Quarto website project
  2. Set draft-mode: gone in _quarto.yml under website:
  3. Create a subdirectory with _metadata.yml containing draft: true
  4. Create a .qmd file in that subdirectory
  5. Run quarto preview from the site root
  6. Navigate to the page URL directly

_quarto.yml

project:
  type: website
  
website:
  draft-mode: gone
  ...

subdirectory/_metadata.yml

draft: true

Actual behavior

The generated HTML is an empty shell ( with no body content). The page is blank.

Setting draft: false in _metadata.yml renders the page correctly, confirming the issue is specific to the draft override during preview. This is not related to #13716 (pre-render scripts) — no pre-render scripts are configured.

Expected behavior

The page renders with a "Draft" banner, as documented at https://quarto.org/docs/websites/website-drafts.html#previewing-drafts

Your environment

  • IDE: Positron (also reproduced via quarto preview in terminal)
  • OS: macOS Tahoe

Quarto check output

[✓] Checking environment information...
Quarto cache location: /Users/bryanpmayfield/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.8.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.9.37
Path: /Applications/quarto/bin

[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)

[✓] Checking LaTeX....................OK
Tex: (not detected)

[✓] Checking Chrome Headless....................OK
Chrome: (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking R installation...........OK
Version: 4.5.3
Path: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources
LibPaths:
- /Users/bryanpmayfield/Library/R/arm64/4.5/library
- /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
knitr: 1.51
rmarkdown: 2.31

[✓] Checking Knitr engine render......OK

[✓] Checking Python 3 installation....OK
Version: 3.9.6
Path: /Library/Developer/CommandLineTools/usr/bin/python3
Jupyter: (None)

  Jupyter is not available in this Python installation.
  Install with python3 -m pip install jupyter

[✓] Checking Julia installation...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpreviewissues related to the `preview` commandwebsitesIssues creating websites

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions