wpilibsuite / sphinxext-opengraph

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

Support additional image tags #10

Closed ItayZiv closed 2 years ago

ItayZiv commented 4 years ago

Support for og:image:width and og:image:height would be useful for making images a decent size (possibly with a default, especially on the height one), it would also need testing on whether specifying only one scales the image or stretches it out of proportions. Support for og:image:type and og:image:alt may or may not be useful.

Edit: For config, it may or may not be useful to not have the all as separate options, maybe under a dict of image_options or something else.

TheTripleV commented 4 years ago

Also, websites support multiple og:image tags but this extension can currently only insert one.

tcmetzger commented 4 years ago

Hey there! First of all, thanks for creating this very helpful extension! I have been looking for an extension like this and have been using my own custom extension to include OG tags in my docs.

I'd be happy to contribute some small improvements if you're interested. As a first idea, I'd like to propose a quick solution to add a very simple image:alt tag. After all, on opg.me they say: "If the page specifies an og:image it should specify og:image:alt.". I would add an additional option (ogp_image_alt) to provide an alt text - if no alt text is provided, we could automatically use ogp_site_name or htp.text as an alt text.

This would not only increase compliance with opg but might also increase search engine visibility.

ItayZiv commented 2 years ago

Remaining issues superseded by #53