1
0
Fork 0
hugo-paper/layouts/shortcodes/collapse.html
nanxiaobei f1387bfc37 5.0
2021-08-20 19:21:20 +08:00

15 lines
423 B
HTML

{{ if .Get "content" }}
{{ if .Get "summary" }}
{{ else }}
{{ warnf "missing value for param 'summary': %s" .Position }}
{{ end }}
{{ else }}
{{ errorf "missing value for param 'content': %s" .Position }}
{{ end }}
<p>
<details {{ if (eq (.Get "openByDefault") true) }}open=true{{ end }}>
<summary markdown="span">{{ .Get "summary" | markdownify }}</summary>
{{ .Get "content" | markdownify }}
</details>
</p>