quarto-dev / quarto-dev/quarto-cli
metadata override through CLI flags is inconsitent
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
This has been discussed in
- https://github.com/quarto-dev/quarto-cli/issues/6013
- https://github.com/quarto-dev/quarto-cli/discussions/6119
Currently there is --metadata and --metadata-file available at Pandoc command line. This is addition of the shared metadata mechanism in Quarto project.
Those 2 flags does not behave the same and this is not clear - this is explain in https://github.com/quarto-dev/quarto-cli/issues/6013
-
--metadatavalues will be processed throughisQuartoMetadata()function, and add to metadata to be used by Quarto process. Otherwise they will be considered Pandoc only metadata. -
--metadata-fileis only considered as Pandoc only metadata. No quarto metadata (likeEDIT: this is the other way, it will be added with other metadata it seemscitationordate-format) can be passed to be processed by Quarto
if this is the behavior we want, we should document this more clearly.
Anyhow, there is inconsistency in isQuartoMetadata() which are the source of the two links issues (#6013 and #6119). Some of the metadata are not considered as isQuartoMetadata whereas they should. This is the case of quarto render test.qmd -M citation:true or quarto render test.qmd -M date-format:"rev. DD.MM.YYYY HH:mm:ss"
This should probably be fixed to really considered all Quarto Metadata in the --metadata flag, as this is the only way to really override the YAML frontmatter value at command line execution (discussion of #6119)
Again detail explanation of the differences in https://github.com/quarto-dev/quarto-cli/issues/6013#issuecomment-1607318287
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the isQuartoMetadata() behavior described in this issue and the linked issues #6013 and discussion #6119. Compare --metadata and --metadata-file handling, including citation and date-format, then verify that the chosen behavior is consistent and clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100