{{ $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" }} {{ with .OutputFormats.Get "rss" -}} {{ printf `` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} {{ end }} {{ partial "opengraph.html" . }} {{ partial "twitter_cards.html" . }} {{ if eq .Type "search" }} {{ end }} {{- if .Site.Params.enablePlausible -}} {{- end -}} {{- partial "lang-detection.html" . -}} {{- if .Store.Get "en_article_in_fr_site" -}} {{- range first 1 .Translations }} {{- end }} {{- else -}} {{- with partial "real-translations.html" . -}} {{- range . | append $ }} {{- end -}} {{- end -}} {{- end -}} {{- $structuredData := dict -}} {{- $description := partialCached "page-description.html" . .Permalink -}} {{- if .IsHome -}} {{- $structuredData = dict "@context" "https://schema.org" "@type" "WebSite" "name" .Site.Title "url" .Permalink "description" $description "inLanguage" .Language.Lang -}} {{- else if and .IsPage (in (slice "blog" "speaking" "writing") .Section) -}} {{- $author := dict "@type" "Person" "name" site.Params.author.name "url" site.Params.author.url -}} {{- $structuredData = dict "@context" "https://schema.org" "@type" (cond (eq .Section "blog") "BlogPosting" "Article") "headline" .Title "description" $description "author" $author "articleSection" .Section -}} {{- with (partialCached "social-image.html" . .Permalink).image -}} {{- $structuredData = merge $structuredData (dict "image" (slice .Permalink)) -}} {{- end -}} {{- if .Store.Get "en_article_in_fr_site" -}} {{- $structuredData = merge $structuredData (dict "inLanguage" "en") -}} {{- range first 1 .Translations -}} {{- $structuredData = merge $structuredData (dict "mainEntityOfPage" (dict "@type" "WebPage" "@id" .Permalink)) -}} {{- end -}} {{- else -}} {{- $structuredData = merge $structuredData (dict "inLanguage" .Language.Lang "mainEntityOfPage" (dict "@type" "WebPage" "@id" .Permalink)) -}} {{- end -}} {{- if not .PublishDate.IsZero -}} {{- $structuredData = merge $structuredData (dict "datePublished" .PublishDate) -}} {{- end -}} {{- if and (not .Lastmod.IsZero) (ne .Lastmod .PublishDate) -}} {{- $structuredData = merge $structuredData (dict "dateModified" .Lastmod) -}} {{- end -}} {{- end -}} {{- with $structuredData }} {{- end }}