{{- 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 }}
{{ partial "page_header.html" . }}
{{ if .Params.abstract }}

{{ i18n "abstract" }}

{{ .Params.abstract | markdownify }}

{{ end }} {{/* If the type is Uncategorized, hide the type. */}} {{ if ne $pub_type 0 }}
{{ i18n "publication_type" }}
{{ end }} {{ if .Params.publication }}
{{ i18n "publication" }}
{{ .Params.publication | markdownify }}
{{ end }}
{{ .Content }}
{{ partial "page_footer" . }}
{{- end -}}