{{/* Built as a map and emitted in one interpolation: Hugo serialises it as JSON, so optional fields can never leave a dangling comma behind. */}} {{ with .Site.Params.webSite }} {{ $d := dict "@context" "https://schema.org" "@type" "WebSite" "name" .name }} {{ with .description }}{{ $d = merge $d (dict "description" .) }}{{ end }} {{ with .image }} {{ with resources.GetMatch . }} {{ $image := . }} {{ if ne $image.MediaType.SubType "svg" }}{{ $image = $image.Resize "960x" }}{{ end }} {{ $d = merge $d (dict "image" $image.Permalink) }} {{ end }} {{ end }} {{ with .copyrightHolder }} {{ $d = merge $d (dict "copyrightHolder" (dict "@type" "Organization" "name" .name)) }} {{ end }} {{ with .url }}{{ $d = merge $d (dict "url" .) }}{{ end }} {{ end }}