Repository navigation
docs: describe how metadata from different sources is merged - #2270
Merged
Merged
Conversation
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.
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.
3 of 5 tasks
Contributor
📝 Preview Deployment🔍 Full site preview: https://deploy-preview-2270.quarto.org 🔄 Modified Documents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to quarto-dev/quarto-cli#14996, which makes a document's front matter merge with
_quarto.yml,_metadata.ymlandmetadata-filesinstead 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-filewas not documented anywhere on the site. A short note in Metadata Includes says how it merges and links to the Pandoc manual.Targets
prereleaseas the change ships in 1.11. Each documented behavior was checked by rendering small projects with a build of quarto-dev/quarto-cli#14996.