Skip to content

docs: describe how metadata from different sources is merged - #2270

Merged
cderv merged 2 commits into
prereleasefrom
docs/metadata-merge-semantics
Oct 6, 2026
Merged

cderv merged 2 commits into
prereleasefrom
docs/metadata-merge-semantics

Conversation

@cderv

@cderv cderv commented Oct 6, 2026

Copy link
Copy Markdown
Member

Companion to quarto-dev/quarto-cli#14996, which makes a document's front matter merge with _quarto.yml, _metadata.yml and metadata-files instead of replacing their values for each top-level key it sets. The Metadata Merging section only said that objects and arrays are merged, so this documents the rules readers now depend on: arrays are combined with duplicates removed, a single value merged with a list is added to it, and which of an included file or its parent wins for a single value.

Pandoc's --metadata-file was not documented anywhere on the site. A short note in Metadata Includes says how it merges and links to the Pandoc manual.

Targets prerelease as the change ships in 1.11. Each documented behavior was checked by rendering small projects with a build of quarto-dev/quarto-cli#14996.

With quarto-dev/quarto-cli#14996, a document's front matter is merged with
_quarto.yml, _metadata.yml and metadata-files instead of replacing their
values for each top-level key it sets. The section only said that objects
and arrays are merged, which left out how lists are combined, what happens
to a single value merged with a list, and which of an included file or its
parent wins.

Pandoc's --metadata-file was not documented anywhere on the site, and it
merges with the document in its own order, so it gets a short note.
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

📝 Preview Deployment

🔍 Full site preview: https://deploy-preview-2270.quarto.org

🔄 Modified Documents

Lists from the project and a directory always combine with the document's list, so a document has no way to drop their entries. A single value also replaces an object set at a lower level, which the section did not say.
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

📝 Preview Deployment

🔍 Full site preview: https://deploy-preview-2270.quarto.org

🔄 Modified Documents

@cderv
cderv merged commit 742450e into prerelease Oct 6, 2026
3 checks passed
@cderv
cderv deleted the docs/metadata-merge-semantics branch October 6, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant