Skip to content

Commit ccf4034

Browse files
committed
Documentation
1 parent cc737ee commit ccf4034

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060

6161
hoverxref_tooltip_maxwidth = 650
6262
hoverxref_auto_ref = True
63+
hoverxref_domains = [
64+
'py',
65+
]
6366
hoverxref_sphinxtabs = True
6467
hoverxref_mathjax = True
6568

docs/configuration.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@ For more specific use cases, you can customize these configuration options in yo
3636

3737
Type: bool
3838

39+
.. confval:: hoverxref_domains
40+
41+
Description: List containing the Sphinx Domain's names where ``hoverxref`` has to be applied.
42+
43+
.. warning::
44+
45+
Only Python Domain (``py``) is currently supported.
46+
47+
Default: ``[]``
48+
49+
Type: list
50+
3951
.. confval:: hoverxref_tooltip_class
4052

4153
Description: CSS class to add to ``div`` created for the tooltip

docs/usage.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,24 @@ that reStructuredText code will render to:
8383

8484
Show a tooltip to :ref:`usage:Tooltip on all :ref: roles` page.
8585

86+
Tooltip on Sphinx Domains
87+
-------------------------
88+
89+
You can decide whether use ``hoverxref`` on a particular Sphinx Domain as well.
90+
An example using Python Domain would be like:
91+
92+
.. code-block:: rst
93+
94+
:py:class:`hoverxref.extension.HoverXRefStandardDomain`
95+
96+
That will render to:
97+
98+
:py:class:`hoverxref.extension.HoverXRefStandardDomain`
99+
100+
101+
To enable ``hoverxref`` on a domain, you need to use the config :confval:`hoverxref_domains`
102+
indicating which are the domains you desire.
103+
86104

87105
Tooltip with content that needs extra rendering steps
88106
-----------------------------------------------------

0 commit comments

Comments
 (0)