Skip to content

Instantly share code, notes, and snippets.

@AbeEstrada
Created January 5, 2022 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AbeEstrada/a8c2d0ee56014ab888cef96c7b513cf2 to your computer and use it in GitHub Desktop.
Save AbeEstrada/a8c2d0ee56014ab888cef96c7b513cf2 to your computer and use it in GitHub Desktop.
Hugo Shortcode: Details
{{ if .Inner }}<details {{ if eq (.Get "open") "true" }}open{{ end }}>
{{ with .Get "title" }}<summary>{{.}}</summary>{{ end }}
{{ .Inner | markdownify }}
</details>{{ end }}
@AbeEstrada
Copy link
Author

{{<details title="Your Content" open="true">}}

Hello World!

- List 1
- List 2

{{</details>}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment