Skip to content

Add hoverxref to our docs #6911

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

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
18 changes: 17 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ def get_version():
'sphinx-prompt',
'recommonmark',
'notfound.extension',
'hoverxref.extension',
'sphinx_search.extension',
]
templates_path = ['_templates']

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

master_doc = 'index'
Expand Down Expand Up @@ -85,6 +86,21 @@ def get_version():
'display_version': False,
}

hoverxref_auto_ref = True
hoverxref_domains = ['py']
hoverxref_roles = [
'option',
'doc',
]
hoverxref_role_types = {
'mod': 'modal', # for Python Sphinx Domain
'doc': 'modal', # for whole docs
'class': 'tooltip', # for Python Sphinx Domain
'ref': 'tooltip', # for hoverxref_auto_ref config
'confval': 'tooltip', # for custom object
}


# Activate autosectionlabel plugin
autosectionlabel_prefix_document = True

Expand Down
3 changes: 3 additions & 0 deletions requirements/local-docs-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ git+https://github.com/agjohnson/sphinx-intl.git@7b5c66bdb30f872b3b1286e371f569c
# Test out in-doc search
git+https://github.com/readthedocs/readthedocs-sphinx-search@master

# Test out hoverxref
git+https://github.com/readthedocs/sphinx-hoverxref@master


Pygments==2.6.1

Expand Down