mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
c1f991efff
Switch back to using xmllint, but now extract + replace the CSS to address the escaping.
12 lines
463 B
HTML
12 lines
463 B
HTML
{{- $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.
|
|
-->
|
|
<figure aria-labelledby="{{ $id }}" itemprop="hasPart" itemscope="" itemtype="https://schema.org/SoftwareSourceCode">
|
|
{{ .Inner | .Page.RenderString -}}
|
|
</figure>
|