quarto-dev / quarto-dev/quarto-r
Setting title via metadata in `quarto_render` does not work
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 161
- Forks
- 29
- Avg merge
- 3h 18m
- Merged PRs (30d)
- 1
Description
Could be related to quarto-dev/quarto-cli#8987
when I try to set title via metadata like so:
quarto::quarto_render("template.qmd", metadata = list(title = "Hahaha", author = "Whoever"))
the title set in metadata is not used in the header block or HTML header (nor emitted correctly via {{< meta title >}} in the body) when a title is set in the document header. When there is no title entry in the YAML header, the title set in metadata is used and does appear in the body.
Setting e.g. the author via metadata works correctly.
Originally posted by @petrbouchal in https://github.com/quarto-dev/quarto-cli/issues/8987#issuecomment-2116261659
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 reproducing the issue with quarto::quarto_render("template.qmd", metadata = list(title = "Hahaha", author = "Whoever")), comparing a document with and without a YAML title. Trace how the metadata reaches the rendered header, HTML header, and {{< meta title >}} output; done means metadata title overrides or is handled consistently when a document title is present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100