Skip to content

Commit be16517

Browse files
committed
Add documentation for warning_text
1 parent 5390900 commit be16517

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/directives/try_examples.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ The `try_examples` directive has options
118118
* `:example_class:` An html class to attach to the outer container for the rendered
119119
examples content and embedded notebook. This can be used in a custom css file to allow
120120
for more precise customization, eg. different button styles across different examples.
121+
* `:warning_text:` Prepend a markdown cell to the notebook containing this text, styled to make it clear this is intended as a warning.
121122

122123
Here's an example with some options set
123124

@@ -126,6 +127,7 @@ Here's an example with some options set
126127
:button_text: Try it in your browser!
127128
:height: 400px
128129
:example_class: blue-bottom
130+
:warning_text: Interactive examples are experimental and may not always work as expected.
129131
130132
The button text has changed and the height now exceeds the size of the content.
131133
@@ -148,6 +150,7 @@ and here is the result
148150
:button_text: Try it in your browser!
149151
:height: 400px
150152
:example_class: blue-bottom
153+
:warning_text: Interactive examples are experimental and may not always work as expected.
151154
152155
The button text has changed and the height now exceeds the size of the content.
153156
@@ -195,13 +198,14 @@ the section header for an examples section will prevent a directive from being i
195198
allowing for specification of examples sections which should not be made interactive.
196199

197200

198-
The button text and theme can be set globally with the config variables
199-
`try_examples_global_button_text`, and `try_examples_global_theme`.
201+
The button text, theme, and warning text can be set globally with the config variables
202+
`try_examples_global_button_text`, `try_examples_global_theme`, and `try_examples_global_warning_text`.
200203

201204
```python
202205
global_enable_try_examples = True
203206
try_examples_global_button_text = "Try it in your browser!"
204207
try_examples_global_height = "200px"
208+
try_examples_global_warning_text = "Interactive examples are experimental and may not always work as expected."
205209
```
206210

207211
There is no option to set a global specific height because the proper height

0 commit comments

Comments
 (0)