feat: add details shortcode

This commit is contained in:
Henk Verlinde
2022-02-09 20:05:13 +01:00
parent e3fdbaa259
commit 7bc15dc0ec
4 changed files with 149 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<details{{ with .Get 1 }} {{ . | safeHTML }}{{ end -}}>
<summary>
{{ with .Get 0 }}{{ . | safeHTML }}{{ else }}{{ errorf "No summary provided"}}{{ end }}
</summary>
{{ with .Inner -}}{{ . | markdownify}}{{ else -}}{{ errorf "No details provided"}}{{ end -}}
</details>