Kermit
Kermit

Reputation: 6022

How to control image previews for links to readthedocs/ sphinx page?

Is there a setting I can tweak in conf.py to ensure that image previews are generated for links to my index.html?

I think I need to put a link to the image inside:

<head><meta name="og:image" content="https://.png" /></head>

Maybe a setting on one of the html_* options? I read through them, but did not see anything.

https://www.sphinx-doc.org/en/master/usage/configuration.html

enter image description here

Page to link to: https://aiqc.readthedocs.io/en/latest/

Upvotes: 0

Views: 498

Answers (1)

Kermit
Kermit

Reputation: 6022

One of many meta tags available in:

https://github.com/wpilibsuite/sphinxext-opengraph

conf.py

extensions = ['sphinxext.opengraph']

ogp_image = "https://raw.githubusercontent.com/aiqc/aiqc/main/docs/images/aiqc_logo_banner_controlroom.png"

It even has a field for user-defined <meta> tags.

Upvotes: 0

Related Questions