Skip to content

Warn when Quarto project uses non-web-servable output formats (pdf, docx, etc.) #4049

Description

@zackverham

Context

In #4021 we removed the --to html flag from the "Render Your Project" command, which was silently overriding per-file format declarations (breaking format: revealjs, etc.). This was fixed in #4048.

With that fix, quarto render now respects all declared formats — including non-web-servable ones like format: pdf or format: docx. These formats aren't valid for Posit Connect deployment, and the current pipeline will fail or produce broken content downstream when it can't find the expected .html output.

Proposal

Add a warning in the inspection layer (QuartoDetector / QuartoInspectOutput) when unsupported output formats are detected. The formats field from quarto inspect output already surfaces this information.

Possible approaches:

  • Warn at inspection time if the only declared format is non-HTML (pdf, docx, etc.)
  • Warn at render time if quarto inspect reveals formats that won't produce web-deployable output
  • Surface the warning in the UI so the user understands why their content may not deploy correctly

Current state

  • QuartoInspectOutput.formats only types html and revealjs — other format keys are silently ignored
  • The static alternative builder (buildStaticAlternative) assumes HTML output throughout
  • There is no validation or user-facing warning for unsupported formats

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions