You can add collapsed block with any data into your markdown document.
Here is an example
Collapse everything you want: code, tables, images, etc.
Code
We use details HTML5 elements. GitHub markdown supports it.
<details>
<summary>Code example</summary>
<p>
...
</p>
</details>
is the same as
<details><summary>Code example</summary><p>
...
</p></details>
Result:
Code example
...
Nested Details
You can place details
inside another one. Use details
+ blockquote
to show left margin.
<details><summary>Hello</summary><blockquote>
<details><summary>World</summary><blockquote>
:smile:
</blockquote></details>
</blockquote></details>
Hello
World
😄
Links