Skip to content

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

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

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
Collaborator

@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)

@ItayZiv ItayZiv force-pushed the fix-first-image-2 branch from 069e461 to 2941072 Compare March 29, 2022 17:33
@TheTripleV TheTripleV merged commit 9f1a8c8 into sphinx-doc:main Mar 29, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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