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:


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!

print("hello world!")
```@raw html

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

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.

1 Like