Skip to content

Commit

Permalink
Add hoverxref to our docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Apr 16, 2020
1 parent 6052f90 commit 2147cec
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
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

0 comments on commit 2147cec

Please sign in to comment.