{{- define "main" -}} {{ $pub_types := partial "functions/get_pub_types" $ }} {{ $pub_type_param := .Params.publication_types | default (slice 0) }} {{/* Convert string in form `"0"` to int (`0`) */}} {{ $pub_type := (int (index $pub_type_param 0)) | default 0 }} {{/* Validate Pub Type if defined */}} {{ if gt $pub_type (sub (len $pub_types) 1) }} {{ warnf "Unknown publication type in %s" .Path }} {{ $pub_type = 0 }} {{ end }}
{{ .Params.abstract | markdownify }}
{{ end }} {{/* If the type is Uncategorized, hide the type. */}} {{ if ne $pub_type 0 }}