{{ if eq .Type "gallery" }} {{ $image := (index (.Resources.ByType "image") 0 ) }} {{ $imageUrl := "" }} {{ if and (.Site.Params.resizeImages | default true) (.Params.resizeImages | default true) }} {{ $imageUrl = ($image.Fill "700x350 q95").Permalink }} {{ else }} {{ $imageUrl = $image.Permalink }} {{ end }} {{ .Scratch.Set "image" $imageUrl }} {{ else if .Resources.GetMatch "featuredImage.*" }} {{ $imageUrl := "" }} {{ if and (.Site.Params.resizeImages | default true) (.Params.resizeImages | default true) }} {{ $imageUrl = ((.Resources.GetMatch "featuredImage.*").Fill "700x350 q95").Permalink }} {{ else }} {{ $imageUrl = (.Resources.GetMatch "featuredImage.*").Permalink }} {{ end }} {{ .Scratch.Set "image" $imageUrl }} {{ else if .Params.featuredImage }} {{ .Scratch.Set "image" (.Params.featuredImage | absURL) }} {{ else if .Params.mp4videoImage }} {{ .Scratch.Set "image" (.Params.mp4videoImage | absURL) }} {{ else }} {{ .Scratch.Set "image" (.Site.Params.featuredImage | absURL) }} {{ end }} {{- if ne .Description "" -}} {{ .Scratch.Set "description" (.Description) }} {{- else -}} {{- if eq .Title .Site.Title -}} {{ .Scratch.Set "description" (.Site.Params.description) }} {{- else -}} {{ .Scratch.Set "description" (printf "%s - %s" (.Title) (.Site.Params.description)) }} {{- end -}} {{- end -}} {{- if eq .Site.Title .Title -}} {{ .Scratch.Set "title" (.Site.Params.subtitle) }} {{- else -}} {{ .Scratch.Set "title" (.Title) }} {{- end -}} {{ hugo.Generator }} {{ block "title" . }} {{ if .Scratch.Get "title" }} {{ .Scratch.Get "title" }} | {{ .Site.Title }} {{ else }} {{ .Site.Title }} {{ end }} {{ end }} {{- if .IsPage }} {{- else -}} {{- end }} {{ partial "favicon.html" . }} {{ if .RelPermalink }} {{ end }} {{ with .Params.original_url }} {{ else }} {{ end }} {{ partial "twitter-card.html" . }} {{ if isset .Site.Params "css_modules" }} {{ range .Site.Params.css_modules }} {{ end }} {{ end }} {{ partial "topnav.html" . }} {{ partial "header.html" . }}
{{ block "main" . }}{{ end }}
{{ partial "footer.html" . }} {{ template "_internal/google_analytics.html" . }} {{ if and (isset .Site.Params "enable_mathjax") (eq .Site.Params.enable_mathjax true) }} {{ partial "mathjax.html" . }} {{ end }} {{ if isset .Site.Params "js_modules" }} {{ range .Site.Params.js_modules }} {{ end }} {{ end }} {{ if and (isset .Site.Params "algolia_search") (eq .Site.Params.algolia_search true) }} {{ partial "algolia-search.html" . }} {{ end }}