You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- {ref}`Figure reference with URL image <figure-name-url>`
40
42
41
43
-- {ref}`Figure reference with local image <figure-name-file>`
@@ -80,22 +82,34 @@ Currently, all tips are created during the build process, so there is no need fo
80
82
The internal tips are created simply by "scraping" the built HTML, which bypasses having to deal with the sphinx internals, like domains etc.
81
83
82
84
Note, there is another sphinx extension for hover tips; [sphinx-hoverxref](https://github.com/readthedocs/sphinx-hoverxref),
83
-
however, one of the annoyances with this is that documentation has to be hosted on Read the Docs for it to work.
84
-
It does though have some nice features, like tooltips for intersphinx, which we would like here.
85
+
however, one of the annoyances with this is that documentation has to be hosted on Read the Docs for it to work, since that used the RTD embed API dynamically.
85
86
86
87
## Configuration
87
88
88
-
The extension has the following configuration options:
89
+
The extension has the following configuration options.
89
90
90
-
:::{confval} tippy_custom_tips
91
-
A dictionary, mapping URLs to HTML strings, which will be used to create custom tips.
91
+
## Display
92
92
93
-
For example, to add a tip for the URL `https://example.com`:
93
+
:::{confval} tippy_props
94
+
Overrides for the [tippy.js props](https://atomiks.github.io/tippyjs/v6/all-props/) to use, by default:
94
95
95
96
```python
96
-
tippy_custom_tips = {
97
-
"https://example.com": "<p>This is a custom tip!</p>"
These configurations enable fetching tips from external APIs.
153
+
154
+
:::{confval} tippy_rtd_urls
155
+
A list of URL prefixes to use for ReadTheDocs tooltips (using the [`/api/v3/embed/` API](https://docs.readthedocs.io/en/stable/api/v3.html#embed)), for example:
156
+
157
+
```python
158
+
tippy_rtd_urls = [
159
+
"https://www.sphinx-doc.org/en/master/",
160
+
]
161
+
```
162
+
163
+
This works for any ReadTheDocs hosted documentation.
164
+
It works well with the [intersphinx extension](https://www.sphinx-doc.org/en/master/usage/quickstart.html#intersphinx).
165
+
166
+
:::
167
+
136
168
:::{confval} tippy_enable_wikitips
137
169
Enable tooltips for wikipedia links, starting `https://en.wikipedia.org/wiki/`, by default `True`.
138
170
:::
@@ -164,6 +196,22 @@ The [jinja template](https://jinja.palletsprojects.com) to use for formatting DO
164
196
(See <https://github.com/CrossRef/rest-api-doc/blob/master/api_format.md>)
165
197
:::
166
198
199
+
200
+
### Miscellaneous
201
+
202
+
:::{confval} tippy_custom_tips
203
+
A dictionary, mapping URLs to HTML strings, which will be used to create custom tips.
204
+
205
+
For example, to add a tip for the URL `https://example.com`:
206
+
207
+
```python
208
+
tippy_custom_tips = {
209
+
"https://example.com": "<p>This is a custom tip!</p>"
210
+
}
211
+
```
212
+
213
+
:::
214
+
167
215
:::{confval} tippy_enable_mathjax
168
216
Whether to enable tooltips for math equations, by default `False`.
0 commit comments