-
-
Notifications
You must be signed in to change notification settings - Fork 30
first_image URLs not resolving correctly on RTD #59
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
Comments
I have a feeling the error is occurring at https://github.com/wpilibsuite/sphinxext-opengraph/blob/d99815bac5a42f5e9ac756cc3e74eebfd80d2505/sphinxext/opengraph/__init__.py#L137 where the relative path is made absolute. The level of |
On the aforementioned line https://github.com/wpilibsuite/sphinxext-opengraph/blob/d99815bac5a42f5e9ac756cc3e74eebfd80d2505/sphinxext/opengraph/__init__.py#L137 |
I have just installed v0.6.2 on our site (pangeo-forge/pangeo-forge-recipes#334), and unfortunately this problem is still happening...see https://pangeo-forge--334.org.readthedocs.build/en/334/pangeo_forge_recipes/tutorials/xarray_zarr/cmip6-recipe.html |
I think I know what the cause might be, if RTD injects a URL that doesn't end in a slash, I think |
Thanks @ItayZiv! It's weird because it was definitely working at some point in the recent past. 🤔 In our current master branch, we are installing |
Oh, I see now, it seems the fix itself is broken, we changed the impl but we didn't catch that if you set an image in the config, it would still, need to be overridden by the first image, ill PR this |
Uh oh!
There was an error while loading. Please reload this page.
Thanks for this amazing package! 👏 So helpful for the open source documentation community.
Context
I am trying to use this extension with a sphinx site (https://github.com/pangeo-forge/pangeo-forge-recipes/tree/master/docs) on ReadTheDocs. My config looks like this
I am explicitly not setting
ocp_site_url
, as I want it to be set automatically, following this code path:https://github.com/wpilibsuite/sphinxext-opengraph/blob/d99815bac5a42f5e9ac756cc3e74eebfd80d2505/sphinxext/opengraph/__init__.py#L70-L72
As far as I can tell, this is working correctly.
What works: default
ogp_image
Our home page - https://pangeo-forge.readthedocs.io/en/latest/index.html - has no image so defaults to
ogp_image
. The headers look like this:The image url - https://pangeo-forge.readthedocs.io/en/latest/_static/pangeo-forge-logo-blue.png - is correct and works.
What does not work: first_image
This page - https://pangeo-forge.readthedocs.io/en/latest/introduction_tutorial/intro_tutorial_part1.html - DOES have an image.
It's header looks like this
Note that here the
og:image
URL is not correct! https://pangeo-forge.readthedocs.io/en/_images/OISST_URL_structure.pngIt should be https://pangeo-forge.readthedocs.io/en/latest/_images/OISST_URL_structure.png
The autogenerated image URL is missing the
/latest
directory.#48 was supposed to add support for relative URLs, but something is not working right here. I would appreciate any suggestions you may have.
🙏 thanks again for your work on this very useful package!
The text was updated successfully, but these errors were encountered: