Skip to content

Use sphinx-hoverxref extension to show tooltips in our docs #6080

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

Conversation

humitos
Copy link
Member

@humitos humitos commented Aug 19, 2019

Example of how our docs will look like with the sphinx-hoverxref extension installed and applied to all :ref: roles.

Result can be seen at https://external-builds.readthedocs.io/html/docs/6080/index.html

@humitos humitos added the PR: work in progress Pull request is not ready for full review label Aug 19, 2019
]
templates_path = ['_templates']

hoverxref_auto_ref = True
# hardcode version because external versions does not work properly
Copy link
Member

Choose a reason for hiding this comment

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

Why don't they work properly?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because the version slug is the number of the PR. In this case, 6080.

So, the URL https://readthedocs.org/api/v2/embed/?project=docs&version=6080&doc=config-file/v2&section=Migrating%20from%20v1 returns a 404

but using latest works.

https://readthedocs.org/api/v2/embed/?project=docs&version=latest&doc=config-file/v2&section=Migrating%20from%20v1

I didn't check the backend yet to know if this can be fixed.

@stale
Copy link

stale bot commented Oct 6, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale Issue will be considered inactive soon label Oct 6, 2019
@humitos
Copy link
Member Author

humitos commented Oct 9, 2019

This makes the extension works on our docs.

screenshot-external-builds readthedocs io-2019 10 09-12_51_42

Although, there is still a bug that makes relative links inside the tooltip content to break: #6082

I'm closing this PR for now. We can enable the extension once we have that other issue fixed.

@humitos humitos closed this Oct 9, 2019
@stsewd stsewd deleted the humitos/use-hoverxref branch August 26, 2020 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: work in progress Pull request is not ready for full review Status: stale Issue will be considered inactive soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants