Skip to content

Commit 82212cf

Browse files
authored
UPGRADE: sphinx-togglebutton v0.3.0 (#390)
1 parent 5f4b8f6 commit 82212cf

2 files changed

Lines changed: 5 additions & 53 deletions

File tree

docs/use/hiding.md

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -77,58 +77,9 @@ points =ax.scatter(*data, c=data[0], s=data[0])
7777

7878
## Hide markdown cells
7979

80-
There are two ways to hide markdown cells. First, **you can add the `hide-input`**
81-
cell metadata. This triggers the same hiding behavior described above for
82-
code cells.
80+
You cannot hide an entire markdown cell, but you can hide sections of markdown **content** by using roles and directives.
8381

84-
+++ {"tags": ["hide-input"]}
85-
86-
```{note}
87-
This cell was hidden by adding a `hide-input` tag to it!
88-
```
89-
90-
+++
91-
92-
You may also **use a Sphinx directive** to hide specific markdown content. This
93-
is possible by adding the **`.toggle`** class to any block-level directive
94-
that will allow for classes. For example, to the `container`, `note`, or `admonition`
95-
directives.
96-
97-
For example, the hidden block below
98-
99-
```{admonition} This cell was hidden with the toggle class
100-
:class: toggle
101-
Wow, a hidden block! ✨✨
102-
```
103-
104-
Is generated with the following code:
105-
106-
````
107-
```{admonition} This cell was hidden with the toggle class
108-
:class: toggle
109-
Wow, a hidden block! ✨✨
110-
```
111-
````
112-
113-
114-
`````{admonition} Don't add headings to toggle-able sections
115-
116-
Note that containers for markdown (like notes, or this `container`
117-
directive) cannot have their own headings (ie, lines that start
118-
with `#`. If you'd like to use headings, do one of the following:
119-
120-
* Use **bolded text** if you want to highlight sections of a
121-
toggle-able section.
122-
* Use an **admonition** directive to control the title of the
123-
message box (that's what this message box uses). Like so:
124-
````
125-
```{admonition} my admonition title
126-
My admonition content
127-
```
128-
````
129-
`````
130-
131-
+++
82+
For information on how to hide / toggle markdown content in Sphinx, see either [the `sphinx-togglebutton` documentation](https://sphinx-togglebutton.readthedocs.io/en/latest/) or the [`sphinx-design` dropdowns documentation](https://sphinx-design.readthedocs.io/en/latest/dropdowns.html).
13283

13384
(use/removing)=
13485

setup.cfg

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ install_requires =
4949
nbformat~=5.0
5050
pyyaml
5151
sphinx>=3.1,<5
52-
sphinx-togglebutton~=0.2.2
52+
sphinx-togglebutton~=0.3.0
5353
python_requires = >=3.6
5454
include_package_data = True
5555
zip_safe = True
@@ -94,7 +94,8 @@ testing =
9494
# TODO: 3.4.0 has some warnings that need to be fixed in the tests.
9595
matplotlib~=3.3.0
9696
numpy
97-
pandas
97+
# TODO: 1.4.0 has some warnings that need to be fixed in the tests.
98+
pandas<1.4
9899
pytest~=5.4
99100
pytest-cov~=2.8
100101
pytest-regressions

0 commit comments

Comments
 (0)