erynwells.me/layouts/shortcodes/collapse.html

10 lines
401 B
HTML
Raw Normal View History

2021-10-11 12:26:47 -07:00
<!---->{{ if not (.Get "summary") }}
<!---->{{ errorf "missing param 'summary': %s" .Position }}
<!---->{{ else if not (.Get "content") }}{{ warnf "missing param 'content': %s" .Position }}
<!---->{{ end }}
<details {{ if (eq (.Get `openByDefault`) true) }}open="true" {{ end }}>
<summary markdown="span">{{ .Get "summary" | markdownify }}</summary>
{{ .Get "content" | markdownify }}
</details>