Skip to content

Instantly share code, notes, and snippets.

View bitwombat's full-sized avatar

Bit Wombat bitwombat

View GitHub Profile
@maxrodrigo
maxrodrigo / details.html
Created April 29, 2020 16:01
Details disclosure and summary elements hugo shortcode.
{{ .Scratch.Set "lastp" (sub (.Params | len) 1) }}
<details {{ if .Get 0 | eq "open"}} open {{ end }}>
<summary>
{{ .Get (.Scratch.Get "lastp") }}
</summary>
{{ .Inner | markdownify }}
</details>