{{ $is_list := .is_list }}
{{ $ := .content }}
{{ with $.Params.url_preprint }}
{{ i18n "btn_preprint" }}
{{ end }}
{{ with $.Params.url_pdf }}
{{ i18n "btn_pdf" }}
{{ end }}
{{ $directory := "static/files/citations/" }}
{{ $filename := printf "%s%s.bib" $directory $.File.TranslationBaseName }}
{{ if fileExists $filename }}
{{ end }}
{{ with $.Params.url_code }}
{{ i18n "btn_code" }}
{{ end }}
{{ with $.Params.url_dataset }}
{{ i18n "btn_dataset" }}
{{ end }}
{{ if $.Params.projects }}
{{ range $.Params.projects }}
{{ with ($.Site.GetPage (printf "project/%s" .)) }}
{{ i18n "btn_project" }}
{{ else }}
{{ errorf "The `projects` parameter in `content/%s` references a project file, `content/project/%s`, which cannot be found. Please either set `projects = []` or fix the reference." $.File.Path . }}
{{ end }}
{{ end }}
{{ else }}
{{ with $.Params.url_project }}
{{ i18n "btn_project" }}
{{ end }}
{{ end }}
{{ with $.Params.url_poster }}
{{ i18n "btn_poster" }}
{{ end }}
{{ with $.Params.url_slides }}
{{ i18n "btn_slides" }}
{{ end }}
{{ with $.Params.url_video }}
{{ i18n "btn_video" }}
{{ end }}
{{ with $.Params.url_source }}
{{ i18n "btn_source" }}
{{ end }}
{{ with $.Params.doi }}
DOI
{{ end }}
{{ range $.Params.url_custom }}
{{ .name }}
{{ end }}