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

Social card links can be broken in multiversioned documentations #103

Open
illia-v opened this issue Jun 8, 2023 · 2 comments
Open

Social card links can be broken in multiversioned documentations #103

illia-v opened this issue Jun 8, 2023 · 2 comments

Comments

@illia-v
Copy link

illia-v commented Jun 8, 2023

urllib3 has recently started relying on sphinxext-opengraph. In urllib3/urllib3#3064 I tried setting up social cards, but ended up facing problems related to canonical URLs in Read the Docs.

urllib3 has docs for multiple versions of the package and for every new pull request.

sphinxext-opengraph seems to always start URLs of the cards with https://urllib3.readthedocs.io/en/stable/ regardless of the docs version (for example, at https://urllib3--3064.org.readthedocs.build/en/3064/.)

This leads to a problem that a score card linked in og:image is not available in any docs version until it is deployed to "stable".

But even after it is deployed there, there is a high chance that og:image in other versions will lead to a nonexistent image because of the hash in the filename affected by multiple details of a page.

@illia-v
Copy link
Author

illia-v commented Jun 8, 2023

Relying on READTHEDOCS_CANONICAL_URL like in readthedocs/readthedocs.org#10224 looks to be a solution

@Daltz333
Copy link
Member

Daltz333 commented Jul 7, 2023

Yep. I'm pretty sure that's what we did over in frc-docs. Development motivation has been slow as of late, but we're always open to reviewing contributions.

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

No branches or pull requests

2 participants