cupper-hugo-theme/themes/inclusive-pattern-docs/layouts/shortcodes/figure.html
2017-06-15 16:41:44 +08:00

8 lines
265 B
HTML

{{ $caption := .Get "caption" }}
<figure role="group" aria-describedby="{{ $caption | base64Encode | truncate 20 "" }}">
{{ .Inner }}
<figcaption id="{{ $caption | base64Encode | truncate 20 "" }}">
{{ .Get "caption" | safeHTML }}
</figcaption>
</figure>