1
0
Fork 0
hugo-paper/layouts/shortcodes/collapse.html
2022-11-15 08:06:02 +08:00

10 lines
401 B
HTML

<!---->{{ 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>