{{ if .Params.image }} {{ .Scratch.Set "image" .Params.image }} {{ if hasPrefix .Params.image "resource:" }} {{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }} {{ .Scratch.Set "image" ($resource.Resize "2000x").RelPermalink }} {{ end }} {{ end }}

{{ .Title }}

{{ if .Params.subtitle }}
{{ markdownify .Params.subtitle | emojify }}
{{ end }} {{ if .IsPage }}

{{ partial "content-details.html" . }}

{{ end }} {{ if .Content }}
{{ if .TableOfContents }} {{ $headers := findRE "(.|\n])+?" .Content }} {{ if ge (len $headers) 4 }}
{{ .TableOfContents }}
{{ end }} {{ end }} {{ .Content }}
{{ end }}