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
`TryExamples` buttons will be hidden in url pathnames matching at least one of these
248
248
patterns, effectively disabling the interactive documentation. In the provided example:
249
249
250
-
* The pattern `"^/latest/.*"` disables interactive examples for urls for the documentation
250
+
* The pattern `"^\/latest\/.*"` disables interactive examples for urls for the documentation
251
251
for the latest version of the package, which may be useful if this documentation is
252
252
for a development version for which a corresponding package build is not available
253
-
in a Jupyterlite kernel.
253
+
in a JupyterLite kernel.
254
254
255
-
* The pattern `"^/stable/reference/generated/example.html"` targets a particular url
255
+
* The pattern `"^\/stable\/reference\/generated\/example.html"` targets a particular url
256
256
in the documentation for the latest stable release.
257
257
258
258
Note that these patterns should match the [pathname](https://developer.mozilla.org/en-US/docs/Web/API/Location/pathname) of the url, not the full url. This is the path portion of
259
-
the url. For instance, the pathname of https://jupyterlite-sphinx.readthedocs.io/en/latest/directives/try_examples.html is `/en/latest/directives/try_examples.html`.
259
+
the url. For instance, the pathname of https://jupyterlite-sphinx.readthedocs.io/en/latest/directives/try_examples.html is `/en/latest/directives/try_examples.html`. Also, note that since these are JavaScript-based regular
260
+
expressions, to use special characters in the regular expression (such as `/`), they
261
+
must be escaped with a backslash (`\`).
260
262
261
263
Again, the configuration file can be added or edited within the deployed documentation,
262
264
allowing for disabling or enabling examples without rebuilding the documentation.
263
265
264
266
#### "global_min_height"
267
+
265
268
To avoid having unusably small notebooks for very small examples due to the default of
266
269
having the embedded notebooks' iframe containers take the same amount of space as the
267
270
rendered content they replace, users can set a global minimum height in
0 commit comments