{{- .Page.Scratch.Add "codeIndexRss" 1 -}} {{- $codeIndex := (int (.Page.Scratch.Get "codeIndexRss")) -}} {{- $id := (printf `code-%d` $codeIndex) -}} {{- with .Get "id" -}} {{- $id = . -}} {{- end -}} {{ with .Parent }} {{- with .Get "id" -}} {{- $id = . -}} {{- end -}} {{- end -}}
Code snippet {{ $codeIndex }}{{with .Get "lang"}} ({{ . }}){{ end -}} : {{ .Inner | .Page.RenderString | safeHTML }}