Documenter.jl and collapsible Markdown?

Is it possible to have collapsible markdown elements in a documentation page (or even the navigation bar) created with Documenter?

Here is an example:
https://gist.github.com/joyrexus/16041f2426450e73f5df9391f7f7ae5f

I’m not sure how well it works with Documenter’s CSS, but it should be possible to use the at-raw blocks for this, as long as you don’t mind writing some HTML:

## collapsible markdown?

```@raw html
<details><summary>CLICK ME</summary>
```
#### yes, even hidden code blocks!

```python
print("hello world!")
```
```@raw html
</details>
```

Cool, thank you very much. This works perfectly.

But could I also use this to load the content of a file and then hide the content inside the collapsible?

So far I used

using Markdown
Markdown.parse("""
```
$(String(read(file_path)))
```
""")

to load the content of my files. Is it possible to integrate this code with @raw html?

Yep, should just work if you put the at-raw blocks around the at-example/eval.

Sorry to resurrect a dead thread, but this is still the thread that shows up when you search for this topic. In the intervening years (I think around v1.0 in late 2023), Documenter has made it much easier to add a collapsible section with a “details” admonition:

!!! details "Title goes here"

    This text gets collapsed.