{{ $is_list := .is_list }} {{ $ := .content }} {{ with $.Params.url_pdf }} {{ $link := . }} {{ if not (urls.Parse .).Scheme }} {{ $link = (printf "%s%s" $.Dir .) | relURL }} {{ end }} {{ i18n "btn_pdf" }} {{ end }} {{ with $.Params.url_slides }} {{ $link := . }} {{ if not (urls.Parse .).Scheme }} {{ $link = (printf "%s%s" $.Dir .) | relURL }} {{ end }} {{ i18n "btn_slides" }} {{ end }} {{ with $.Params.url_video }} {{ $link := . }} {{ if not (urls.Parse .).Scheme }} {{ $link = (printf "%s%s" $.Dir .) | relURL }} {{ end }} {{ i18n "btn_video" }} {{ end }} {{ with $.Params.url_code }} {{ $link := . }} {{ if not (urls.Parse .).Scheme }} {{ $link = (printf "%s%s" $.Dir .) | relURL }} {{ end }} {{ i18n "btn_code" }} {{ end }} {{ 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 }} {{ range $.Params.url_custom }} {{ $link := .url }} {{ if not (urls.Parse .url).Scheme }} {{ $link = (printf "%s%s" $.Dir .url) | relURL }} {{ end }} {{ .name }} {{ end }}