Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docusaurus v2 collapsible section in markdown

Tags:

docusaurus

Is there an easy way to create a collapsible section in Docusaurus V2 markdown?

Would look for something similar to this on GitHub: https://gist.github.com/joyrexus/16041f2426450e73f5df9391f7f7ae5f

like image 600
dakami Avatar asked Jan 01 '23 05:01

dakami


1 Answers

All you had to do was to add the gist code in your markdown file, I did the same and it worked out for me.

Check this out - HTML details tag

<details><summary>CLICK ME</summary>
<p>

#### yes, even hidden code blocks!

```python
print("hello world!")
```

</p>
</details>
like image 152
Germa Vinsmoke Avatar answered Mar 04 '23 16:03

Germa Vinsmoke