Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix read the docs canonical url #135

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

Closed
wants to merge 3 commits into from
Closed

Conversation

nineteendo
Copy link

@nineteendo nineteendo commented Apr 22, 2025

The current logic of grabbing the root from the canonical url is wrong:

Screenshot 2025-04-22 at 11 22 10

You can easily see this if you remove this line from conf.py:

ogp_site_url = 'https://sphinxext-opengraph.readthedocs.io/en/latest/'

Then you get something like this:

<meta property="og:url" content="https://sphinxext-opengraph.readthedocs.io/index.html">
<meta property="og:image" content="https://sphinxext-opengraph.readthedocs.io/_images/social_previews/summary_index_c6c9679d.png">

Documentation preview: https://sphinxext-opengraph--135.org.readthedocs.build/en/135

@nineteendo nineteendo closed this Apr 22, 2025
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.

1 participant