Skip to content

fix: Apply extension-contributed project metadata in quarto preview - #14784

Open
mcanouil wants to merge 1 commit into
quarto-dev:mainfrom
mcanouil:fix/issue14783
Open

fix: Apply extension-contributed project metadata in quarto preview#14784
mcanouil wants to merge 1 commit into
quarto-dev:mainfrom
mcanouil:fix/issue14783

Conversation

@mcanouil

@mcanouil mcanouil commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Fixes #14783.

Project metadata contributed by an extension through contributes.metadata.project, such as brand, was applied on the render path only.
The preview command builds the project context before the render services exist, so the contribution never reached the project configuration.

The merge now runs for every project context, with a fresh extension context when the render options are absent.
f6a0f89 made that same move for engine extensions in #14208, and left the metadata merge behind the gate with the note that it needs the render options.
The merge in fact uses services.extension only, so this change completes that work instead of taking a different route to it.
Invalid contributed metadata stays fatal for a render, and becomes a warning that names the extension elsewhere, so a faulty extension cannot stop quarto preview, quarto inspect, quarto publish or quarto serve.
Every command that builds a project context applies the metadata now, so quarto inspect reports it as well.

The new tests build the context the way preview does, without render options, and cover the brand for a single file and for a project, the render path, a contributed output-dir, and a faulty extension.
Run locally with the brand, extension, project and inspect tests, 55 tests, all correct.

@posit-snyk-bot

posit-snyk-bot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mcanouil mcanouil added the bug Something isn't working label Aug 18, 2026
@mcanouil mcanouil self-assigned this Aug 18, 2026
@mcanouil mcanouil changed the title Apply extension-contributed project metadata in quarto preview fix: Apply extension-contributed project metadata in quarto preview Aug 18, 2026
@mcanouil
mcanouil force-pushed the fix/issue14783 branch 2 times, most recently from 2e7d315 to 612d99a Compare August 18, 2026 10:00
@mcanouil
mcanouil marked this pull request as ready for review August 18, 2026 12:09
Project metadata contributed by an extension through
contributes.metadata.project, such as brand, was applied only on the
render path. The preview command builds the project context before the
render services exist, so the contribution never reached the project
configuration and the brand was ignored.

The merge now runs in every project context, with a fresh extension
context when the render options are absent. Invalid contributed
metadata stays fatal for a render, and becomes a warning that names the
extension elsewhere, so preview, inspect, publish and serve keep
working.

Fixes quarto-dev#14783
@cscheid
cscheid requested a review from cderv August 18, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

brand.yml not being picked up by quarto preview in extension

2 participants