Setting open-graph and twitter images for all chapters of a Quarto book #11914
-
DescriptionI was under the impression that if I set However, it seems to me that
Isn't it a bug...? Especially because the documentation says "by default, Quarto will use the image value from the format metadata", and this is exactly what I have done, provided an image value in the format metadata -- yet, Quarto will use different image (probably in all cases, if we do not have chapters without image!). A minimal reproducible example:
Now, if you render this, the main page's HTML will include |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Your quote is partial:
Source: https://quarto.org/docs/websites/website-tools.html#social-metadata Unfortunately as you did not provide a small reproducible example for example using |
Beta Was this translation helpful? Give feedback.
-
Dear @mcanouil , I discovered something, and I thought it worth sharing here. Namely, I realized that if I move the I first thought that this was a very trivial mistake on my part, surely I just haven't read the documentation carefully enough. Now, with this knowledge in my mind, I returned to the manual, and I think it is not really clear: So after all, isn't it just a minor problem with the documentation...? |
Beta Was this translation helpful? Give feedback.
I did make a usable working example:
https://github.com/mcanouil/quarto-issues-experiments/tree/main/quarto-cli-11914
I don't think
image
is actually used in Books when usingcover-image
.The reference schema is reusing the components/documentation thus the inaccuracy (maybe worth adding a bit more about
cover-image
in the schema and https://quarto.org/docs/books/book-output.html#cover-images).For books
image
should be read ascover-image
(if used) inside twitter/open-graph.The precedence is
open-graph.image
>cover-image
>image
.When you use
image
under format, it works because of the order in which the metadata are used/merged.If you want to use a social image that is not the cover…