{{ $chroma := resources.Get "css/chroma.css" }} {{ $itix := resources.Get "css/itix.css" }} {{ $css := slice $chroma $itix | resources.Concat "css/itix.css" | resources.Minify | resources.Fingerprint "sha512" }} {{- if .IsHome }} {{- with .Site.Params.description }} {{- else }} {{- end }} {{- else }} {{- with .Params.description }} {{- else }} {{- end }} {{- end }} {{ template "_internal/opengraph.html" . }} {{ template "_internal/twitter_cards.html" . }} {{ if eq .Type "search" }} {{ end }} {{- if .Site.Params.enablePlausible -}} {{- end -}} {{- if .Params.enableMathJax -}} {{- partial "mathjax.html" . -}} {{- end -}} {{- partial "lang-detection.html" . -}} {{- if .IsTranslated -}} {{- range .Translations -}} {{- if .Scratch.Get "en_article_in_fr_site" -}} {{ else }} {{ end -}} {{- end -}} {{- end -}} {{- if .IsHome -}} {{- $.Scratch.Set "structured_data" (dict "@context" "http://schema.org" "@type" "WebSite" "name" .Site.Title "url" .Site.BaseURL) -}} {{- with .Site.Params.subtitle -}} {{- $.Scratch.SetInMap "structured_data" "description" . -}} {{- end -}} {{- else if and .IsPage (eq .Section "blog") -}} {{- $.Scratch.Set "structured_data" (dict "@context" "http://schema.org" "@type" "BlogPosting" "headline" .Title "image" (slice) "articleSection" .Section) -}} {{- if and (eq .Lang "fr") (.Scratch.Get "en_article_in_fr_site") -}} {{- $.Scratch.SetInMap "structured_data" "inLanguage" "en" -}} {{- range first 1 .Translations -}} {{- $.Scratch.SetInMap "structured_data" "mainEntityOfPage" (dict "@type" "WebPage" "@id" .Permalink) -}} {{- end -}} {{- else -}} {{- $.Scratch.SetInMap "structured_data" "inLanguage" .Language.Lang -}} {{- $.Scratch.SetInMap "structured_data" "mainEntityOfPage" (dict "@type" "WebPage" "@id" .Permalink) -}} {{- end -}} {{- if not .PublishDate.IsZero -}} {{- $.Scratch.SetInMap "structured_data" "datePublished" .PublishDate -}} {{- end -}} {{- if and (not .Lastmod.IsZero) (ne .Lastmod .PublishDate) -}} {{- $.Scratch.SetInMap "structured_data" "dateModified" .Lastmod -}} {{- end -}} {{- end -}} {{- with $.Scratch.Get "structured_data" }} {{- end }}