Gestion du JSON-LD
This commit is contained in:
@@ -10,16 +10,13 @@
|
||||
{{- $socialImage := partial "head/social-image.html" . -}}
|
||||
{{- $openGraphImage := $socialImage.openGraph -}}
|
||||
{{- $twitterImage := $socialImage.twitter -}}
|
||||
{{- $searchPath := site.Params.search.action | relURL -}}
|
||||
{{- $isSearchPage := eq .RelPermalink $searchPath -}}
|
||||
{{- $noindex := partial "seo/noindex.html" . -}}
|
||||
{{- $pageClassification := partial "seo/page-classification.html" . -}}
|
||||
{{- $robots := "max-image-preview:large" -}}
|
||||
{{- if $isSearchPage -}}
|
||||
{{- if $noindex -}}
|
||||
{{- $robots = "noindex, follow" -}}
|
||||
{{- end -}}
|
||||
{{- $ogType := "website" -}}
|
||||
{{- if and .IsPage (not $isSearchPage) -}}
|
||||
{{- $ogType = "article" -}}
|
||||
{{- end -}}
|
||||
{{- $ogType := index $pageClassification "openGraphType" -}}
|
||||
{{- $localeCode := site.LanguageCode | default site.Language.LanguageCode | default "fr-FR" -}}
|
||||
{{- $locale := replace $localeCode "-" "_" -}}
|
||||
<title>{{ $title }}</title>
|
||||
@@ -60,7 +57,7 @@
|
||||
{{- with $twitterImage.alt }}
|
||||
<meta name="twitter:image:alt" content="{{ . }}">
|
||||
{{- end }}
|
||||
{{- if eq $ogType "article" -}}
|
||||
{{- if and (eq $ogType "article") (index $pageClassification "isArticleLike") -}}
|
||||
{{- with .Date }}
|
||||
<meta property="article:published_time" content="{{ .Format "2006-01-02T15:04:05Z07:00" }}">
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user