Open cderv opened 3 weeks ago
I looked quickly into this to diagnose and I think this happens also in regular rendering not only for blog or listing.
Basically, we have a part in our code where we "override" any processing that could have been done, by forcing the use of the metadata inside the document. https://github.com/quarto-dev/quarto-cli/blob/b34b24d924f1d7b708611592c0d96fd8b3adc3a3/src/command/render/pandoc.ts#L978-L1002
So basically in here:
pandocMetadata['author']
has correctly the merged authors so the two valueauthor
key is not identified as a quarto metadata and so it gets overriden by engineMetadata['author'];
which is the document value set. We got already bitten by this in revealjs for themes, where I added an escape https://github.com/quarto-dev/quarto-cli/blob/b34b24d924f1d7b708611592c0d96fd8b3adc3a3/src/command/render/pandoc.ts#L994-L998
This is very old codebase (341cc3b8eb79c6cc53e172dec3b532148db107c9 from 3 years) for backward compatibility for inline yaml rendering.
So I think either we keep it but we probably need to consider author
as a isQuartoMetadata
key because we process it. Or we should remove this overwrite which does not make sense anymore probably.
FYI:
it was another issue were all were merged resulting in duplicates, the fix was: https://github.com/quarto-dev/quarto-cli/commit/478b3df44b6db1e97d9bb25d5ec4dc6b0f33cdb8
Yes this is different. #8860 is really about listing. As I said here, the problem happening also with default project, using shared metadata.
A note that this is not only for author
, but any key
that will pass the check !isQuartoMetadata(key) && !isChapterTitle && !isIncludeMetadata(key)
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/9855