vanilla-hugo/layouts/partials/highlightgroup.html
Danila Fedorin a6425c7510 Always add line numbers (why not?), but specially tag Agda blocks
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-21 20:41:10 -07:00

8 lines
452 B
HTML

{{- if (or .firstLine .lastLine) -}}
{{- page.Scratch.Set "highlightGroupAttrs" (printf "data-first-line=\"%v\" data-last-line=\"%v\"" .firstLine .lastLine) -}}
{{- end -}}
{{- if eq .language "Agda" -}}
{{- page.Scratch.Add "highlightGroupAttrs" " data-agda-block" -}}
{{- end -}}
{{ partial "group.html" (dict "url" .url "path" .path "comment" .comment "content" (highlight .code .language .opts) "attrs" (page.Scratch.Get "highlightGroupAttrs")) }}