Description
Discussed in #10568
Originally posted by andrewpbray August 20, 2024
Description
Hello! I'm running into a puzzling issue when trying to create a metadata extension. I have an extension that I'd like to add metadata-files
to the _quarto.yml
to set a draft list.
contributes:
metadata:
project:
output-dir: _mysite
metadata-files:
- draft-list.yml
When I render this website, the draft list does not appear to have taken effect. It will work, however, if I adjust _quarto.yml
to read:
project:
type: website
website:
sidebar:
contents:
- index.qmd
- about.qmd
metadata-files:
- draft-list.yml
Which suggests the issue is in merging the metadata-files
key in from the extension (the output-dir
does take effect).
Minimal example is here: https://github.com/andrewpbray/reprex-metadata-merge
The docs on metadata extensions state "Currently, metadata extensions only merge project-level metadata. This limitation will be lifted in the future." I had assumed "project-level metadata" is anything that appears in _quarto.yml
but perhaps its only the keys that are accepted under the project
key. I've tried shifting metadata-files
so that it's not under the metadata
key, but still no luck.
The real use-case here is the scheduled-docs extension. It has a pre and post render script (that run just fine) that generate a draft-list.yml
that I'd like to automatically get merge into _quarto.yml
without the user needing to manually modify their _quarto.yml
.