diff --git a/content/pages/playground.md b/content/pages/playground.md index 593bdf7..b8e3e66 100644 --- a/content/pages/playground.md +++ b/content/pages/playground.md @@ -10,3 +10,13 @@ asciinema: true {{< asciinema key="demo" >}} There should be a asciinema cast above! +{{< details title="Click to see sample json" >}} +```json +{ + "external_tracker_url": "https://github.com/caddyserver/caddy/issues", + "external_tracker_format": "https://github.com/caddyserver/caddy/issues/{index}", + "external_tracker_style": "numeric", + "external_tracker_regexp_pattern": "" +} +``` +{{< /details >}} diff --git a/layouts/shortcodes/details.html b/layouts/shortcodes/details.html new file mode 100644 index 0000000..c52126d --- /dev/null +++ b/layouts/shortcodes/details.html @@ -0,0 +1,9 @@ +{{- /* +Template comment syntax: https://hugo.d.balki.me/templates/introduction/#comments +collapsable section ref: https://stackoverflow.com/a/78475534 +*/ -}} + +
+ {{ .Get "title" | default "Click to expand" | markdownify }} +
{{ .Inner | markdownify }}
+