Collapsible Codeblocks

I just migrated from Hugo. I was using this theme GitHub - dillonzq/LoveIt: ❤️A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题

in Hugo that had collapsible codeblocks as shown here Theme Documentation - Content - LoveIt

I was wondering if there was an easy way to do that in Zola? If not can anyone who has already implemented this share their code/theme?

I haven’t seen it but you will have to do it with a shortcode that adds some JS to collapse things.