add shortcode for collapsable section
This commit is contained in:
9
layouts/shortcodes/details.html
Normal file
9
layouts/shortcodes/details.html
Normal file
@ -0,0 +1,9 @@
|
||||
{{- /*
|
||||
Template comment syntax: https://hugo.d.balki.me/templates/introduction/#comments
|
||||
collapsable section ref: https://stackoverflow.com/a/78475534
|
||||
*/ -}}
|
||||
|
||||
<details>
|
||||
<summary>{{ .Get "title" | default "Click to expand" | markdownify }}</summary>
|
||||
<div>{{ .Inner | markdownify }}</div>
|
||||
</details>
|
Reference in New Issue
Block a user