{{/* Get the resource from the module's assets folder */}} {{ $css := resources.Get "css/academic-contact.css" }} {{/* Minify and Fingerprint for production */}} {{ if hugo.IsProduction }} {{ $css = $css | minify | fingerprint }} {{ end }} {{/* Output the link tag */}}
{{ range sort (index .Site.Data.academic_contact) "weight" "asc" }} {{/* Removing link for location */}} {{ if not (in .type "location") }} {{/* Building link for each type */}} {{/* Initialize the variable */}} {{ $baselink := "" }} {{ if eq .type "email" }} {{ $baselink = "mailto:" }} {{ end }} {{ if eq .type "orcid" }} {{ $baselink = "https://orcid.org/" }} {{/* Note: ORCID usually uses .org */}} {{ end }} {{ if eq .type "scholar" }} {{ $baselink = "https://scholar.google.com/citations?user=" }} {{ end }} {{ if eq .type "github" }} {{ $baselink = "https://github.com/" }} {{ end }} {{ end }} {{/* Capture the icon type for image name */}} {{ $imageName := .type }} {{/* Construct the match pattern string */}} {{ $pattern := printf "icons/%s*" $imageName }} {{/* Use the pattern to get the resource */}} {{ $image := resources.GetMatch $pattern }} {{ with $image }} {{/* Use .RelPermalink to get the actual dynamic URL */}} {{ $imageName }} icon {{ end }} {{ if in .type "location" }} {{ .value }} {{ else }} {{ .type | humanize }} {{ end }} {{ if not (in .type "location") }} {{ end}} {{ end }}