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
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ def get_version():
'recommonmark',
'notfound.extension',
'sphinx_search.extension',
'hoverxref.extension',
]
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.

hoverxref_version = 'latest'

source_suffix = ['.rst', '.md']

master_doc = 'index'
Expand Down
1 change: 1 addition & 0 deletions requirements/local-docs-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ sphinx-prompt==1.0.0
sphinx-notfound-page==0.4
commonmark==0.9.0
recommonmark==0.5.0
git+https://github.com/humitos/sphinx-hoverxref@master