asciidoctor / asciidoctor-reveal.js

:crystal_ball: A reveal.js converter for Asciidoctor and Asciidoctor.js. Write your slides in AsciiDoc!
http://asciidoctor.org
Other
287 stars 189 forks source link

Collapsible blocks #484

Open ebousse opened 1 year ago

ebousse commented 1 year ago

Asciidoc provides a way to declare collapsible blocks, as written in the documentation: https://docs.asciidoctor.org/asciidoc/latest/blocks/collapsible/

And when using the regular HTML5 generator of asciidoctor, a collapsible block is generated in this way: <details> <summary class="title">Details</summary> … </details>

However, when using asciidoctor-reveal.js, this code is generated: <div class="exampleblock">…

Is it planned to support collapsible blocks in asciidoctor-reveal.js? And in fact, since it relies on the HTML5 generator of asciidoctor, why isn't it already enabled?

Thanks for reading me!

ggrossetie commented 1 year ago

Hello Erwan,

The reason is that we are overriding the built-in converter with templates: https://github.com/asciidoctor/asciidoctor-reveal.js/blob/master/templates/example.html.slim

So we need to implement this logic in the example.html.slim template. Feel free to submit a pull request to add this feature, I will gladly merge it!

ebousse commented 1 year ago

Thank you for answering! Makes sense now!