2022-04-21 00:56:06 +00:00
|
|
|
{{- $codeIndex := (.Page.Scratch.Get "codeIndex") -}}
|
|
|
|
{{- $id := (printf `code-%d` (sub $codeIndex 1)) -}}
|
|
|
|
{{- with .Get "id" -}}
|
|
|
|
{{- $id = . -}}
|
|
|
|
{{- end -}}
|
|
|
|
<!--
|
|
|
|
The full caption is too long for an aria-label;
|
|
|
|
just use the beginning for the label and the full thing for the aria description.
|
|
|
|
-->
|
2022-05-06 02:57:27 +00:00
|
|
|
<figure aria-labelledby="{{ $id }}" itemprop="hasPart" itemscope itemtype="https://schema.org/SoftwareSourceCode">
|
2022-04-27 00:15:42 +00:00
|
|
|
{{ .Inner | markdownify -}}
|
2022-04-20 01:06:57 +00:00
|
|
|
</figure>
|