aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes/disclose.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/shortcodes/disclose.html')
-rw-r--r--themes/default/layouts/shortcodes/disclose.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/themes/default/layouts/shortcodes/disclose.html b/themes/default/layouts/shortcodes/disclose.html
index fdbcc6a..2cc99c7 100644
--- a/themes/default/layouts/shortcodes/disclose.html
+++ b/themes/default/layouts/shortcodes/disclose.html
@@ -1,5 +1,9 @@
{{- $text := default "Content Warning: " (.Get "text" | default (.Get 0)) -}}
+{{- if gt (len .Inner) 1 -}}
+ {{- $text = .Inner -}}
+{{- end -}}
+
<details data-disclosure>
<summary>{{ (or $.Page.Params.title $text) | markdownify }}</summary>
</details>