Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix first_image not resolving correctly when in subdirectories and ogp_image is defined. #63

Merged
merged 3 commits into from
Mar 29, 2022

Conversation

ItayZiv
Copy link
Collaborator

@ItayZiv ItayZiv commented Mar 29, 2022

Fixes #59 again.
The fix in #61 doesn't work properly when a ogp_image is defined in the config.
Swaps the order of the if's and fixes the tests so it will detect this case.

Copy link
Member

@TheTripleV TheTripleV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the condition on L125-L128 fails, then first_image is not None and ogp_use_first_image == True but it shouldn't be using page_url as the root.

Can you add in a

else:
	first_image = None

on that statement? (Github won't let me suggest there)

sphinxext/opengraph/__init__.py Outdated Show resolved Hide resolved
@TheTripleV TheTripleV merged commit 9f1a8c8 into wpilibsuite:main Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

first_image URLs not resolving correctly on RTD
2 participants