mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-18 06:42:10 +00:00
6 lines
433 B
HTML
6 lines
433 B
HTML
{{ $codeIndex := (.Page.Scratch.Get "codeIndex") }}
|
|
<figcaption>
|
|
<strong itemprop="name" id="{{ if .Get "id" }}{{.Get "id"}}{{else}}code-{{ $codeIndex }}{{end}}"> <span itemprop="codeSampleType">Code snippet</span> {{ $codeIndex }}</strong>{{with .Get "lang"}} (<span itemprop="programmingLanguage">{{ . }}</span>){{end}}:
|
|
{{ .Inner | markdownify | safeHTML }}
|
|
</figcaption>
|
|
{{- .Page.Scratch.Set "codeIndex" (add 1 $codeIndex) -}}
|