Skip to content

Setting open-graph and twitter images for all chapters of a Quarto book #11914

Answered by mcanouil
tamas-ferenci asked this question in Q&A
Discussion options

You must be logged in to vote

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 using cover-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 as cover-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…

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
6 replies
@tamas-ferenci
Comment options

@mcanouil
Comment options

@tamas-ferenci
Comment options

@mcanouil
Comment options

@tamas-ferenci
Comment options

Comment options

You must be logged in to vote
3 replies
@mcanouil
Comment options

mcanouil Feb 2, 2025
Collaborator

@mcanouil
Comment options

mcanouil Feb 2, 2025
Collaborator

Answer selected by tamas-ferenci
@tamas-ferenci
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants