{{ if and .Params.image (not .Params.hide_header_image) }} {{ .Scratch.Set "image" .Params.image }} {{ if hasPrefix .Params.image "resource:" }} {{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }} {{ .Scratch.Set "image" ($resource.Resize "2000x webp").RelPermalink }} {{ else if hasPrefix .Params.image "unsplash:" }} {{ $unsplash_id := replace .Params.image "unsplash:" "" }} {{ $query := querify "client_id" (getenv "UNSPLASH_ACCESS_KEY") }} {{ $unsplash_data := (getJSON "https://api.unsplash.com/photos/" $unsplash_id "?" $query )}} {{ .Scratch.Set "image" $unsplash_data.urls.regular }} {{ .Scratch.Set "unsplash_data" $unsplash_data }} {{ end }} {{ end }} {{ partial "breadcrumbs/index.html" . }}
{{ partial "content-details.html" . }}
{{ end }} {{ if .Content }}