enhance collapse shortcode

This commit is contained in:
Reorx 2022-05-05 00:35:09 +08:00
parent 0654046820
commit c369bd5b3f
1 changed files with 1 additions and 5 deletions

View File

@ -1,8 +1,4 @@
{{ if .Get "summary" }}
{{ else }}
{{ warnf "missing value for param 'summary': %s" .Position }}
{{ end }}
<p><details {{ if (eq (.Get "openByDefault") true) }} open=true {{ end }}>
<summary markdown="span">{{ .Get "summary" | markdownify }}</summary>
<summary markdown="span">{{ .Get 0 | markdownify }}</summary>
{{ .Inner | markdownify }}
</details></p>