wpilibsuite / sphinxext-opengraph

Sphinx extension to generate unique OpenGraph metadata
https://sphinxext-opengraph.readthedocs.io
Other
74 stars 27 forks source link

Use different image than the first one for subset of files #45

Closed NicolasGensollen closed 2 years ago

NicolasGensollen commented 2 years ago

Hi there,

First of all, thanks for this great and useful tool! :+1: I was wondering if there is currently a way to NOT use the first image (even if there is one available) for a subset of files.

My use case is that my index page has a carousel of example images, such that the very first image gets picked but I would rather use the project logo instead for this page (which is set through ogp_image).

The config looks like this for now:

ogp_image = "https://.../logo.png"  # The logo image I want to use in some files although they have a first image availbale
ogp_use_first_image = True

If there is no way to do that now, would it be of interest as a new feature?

Hope this makes sense!

Nicolas

Daltz333 commented 2 years ago

See #11. A refactor to make this possible is in-progress.