|
|
|
@ -8,11 +8,24 @@ |
|
|
|
<meta name="description" content="{{ .Params.description }}"> |
|
|
|
{{- end }} |
|
|
|
|
|
|
|
<!-- Tell IE to use the Edge engine --> |
|
|
|
<meta name="X-UA-Compatible" content="IE=edge"> |
|
|
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"> |
|
|
|
<meta content="telephone=no" name="format-detection"> |
|
|
|
<meta name="renderer" content="webkit"> |
|
|
|
<meta name="theme-color" content="#ffffff"> |
|
|
|
|
|
|
|
<!-- |
|
|
|
-- The viewport is the user's visible area of a web page. |
|
|
|
-- The viewport varies with the device, and will be smaller on a mobile phone |
|
|
|
-- than on a computer screen. |
|
|
|
-- |
|
|
|
-- This meta tag let web designers take control over the viewport. |
|
|
|
-- |
|
|
|
-- The width property controls the size of the viewport. It can be set to |
|
|
|
-- the special value device-width, which is the width of the screen in CSS |
|
|
|
-- pixels at a scale of 100%. |
|
|
|
-- |
|
|
|
-- The initial-scale=1.0 part sets the initial zoom level when the page |
|
|
|
-- is first loaded by the browser. |
|
|
|
--> |
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
|
|
|
|
|
{{ template "_internal/opengraph.html" . }} |
|
|
|
{{ template "_internal/twitter_cards.html" . }} |
|
|
|
@ -25,16 +38,76 @@ |
|
|
|
{{- partial "mathjax.html" . -}} |
|
|
|
{{- end -}} |
|
|
|
|
|
|
|
<!-- Deal with the case of english articles published in the french site --> |
|
|
|
{{- partial "lang-detection.html" . -}} |
|
|
|
{{- if .IsTranslated -}} |
|
|
|
{{- range .Translations -}} |
|
|
|
{{- if .Scratch.Get "en_article_in_fr_site" -}} |
|
|
|
<!-- |
|
|
|
-- It's an english article published in the french site |
|
|
|
-- Tell Google not to index it and link to the original article. |
|
|
|
--> |
|
|
|
<link rel="canonical" href="{{ .Permalink }}"> |
|
|
|
<meta name="robots" content="noindex"> |
|
|
|
{{ else }} |
|
|
|
<!-- Otherwise, just link to the available translations, if any. --> |
|
|
|
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ .Language.LanguageName }}"> |
|
|
|
{{ end -}} |
|
|
|
{{- end -}} |
|
|
|
{{- end -}} |
|
|
|
|
|
|
|
{{- if .IsHome }} |
|
|
|
<script type="application/ld+json"> |
|
|
|
{ |
|
|
|
"@context": "http://schema.org", |
|
|
|
"@type": "WebSite", |
|
|
|
"name": "{{ .Site.Title | safeJS }}", |
|
|
|
"url": "{{ .Site.BaseURL }}", |
|
|
|
"description": "{{ .Site.Params.subtitle | safeJS }}", |
|
|
|
"license": "Copyright {{ .Site.Home.Date.Year }} {{ .Site.Title | safeJS }}" |
|
|
|
} |
|
|
|
</script> |
|
|
|
{{ else if .IsPage -}} |
|
|
|
<script type="application/ld+json"> |
|
|
|
{ |
|
|
|
"@context": "http://schema.org", |
|
|
|
"@type": "BlogPosting", |
|
|
|
"articleSection": "{{ .Section }}", |
|
|
|
"name": "{{ .Title | safeJS }}", |
|
|
|
"headline": "{{ .Title | safeJS }}", |
|
|
|
"description": "{{ if .Description }}{{ .Description | safeJS }}{{ else }}{{ if .IsPage }}{{ .Summary | plainify | htmlUnescape | safeJS }}{{ end }}{{ end }}", |
|
|
|
"inLanguage": {{ .Site.LanguageCode | default "en-us" }}, |
|
|
|
"isFamilyFriendly": "true", |
|
|
|
"mainEntityOfPage": { |
|
|
|
"@type": "WebPage", |
|
|
|
"@id": "{{ .Permalink }}" |
|
|
|
}, |
|
|
|
"author" : { |
|
|
|
"@type": "Person", |
|
|
|
"name": "{{ .Site.Title | safeJS }}" |
|
|
|
}, |
|
|
|
"creator" : { |
|
|
|
"@type": "Person", |
|
|
|
"name": "{{ .Site.Title | safeJS }}" |
|
|
|
}, |
|
|
|
"accountablePerson" : { |
|
|
|
"@type": "Person", |
|
|
|
"name": "{{ .Site.Title | safeJS }}" |
|
|
|
}, |
|
|
|
"copyrightHolder" : "{{ .Site.Title | safeJS }}", |
|
|
|
"copyrightYear" : "{{ .Site.Home.Date.Year }}", |
|
|
|
"dateCreated": "{{ .Date.Format "2006-01-02T15:04:05.00Z" | safeHTML }}", |
|
|
|
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05.00Z" | safeHTML }}", |
|
|
|
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05.00Z" | safeHTML }}", |
|
|
|
"publisher":{ |
|
|
|
"@type":"Person", |
|
|
|
"name": {{ .Site.Title | safeJS }}, |
|
|
|
"url": {{ .Site.BaseURL }} |
|
|
|
}, |
|
|
|
"url" : "{{ .Permalink }}", |
|
|
|
"wordCount" : "{{ .WordCount }}" |
|
|
|
} |
|
|
|
</script> |
|
|
|
{{ end -}} |
|
|
|
|
|
|
|
</head> |
|
|
|
|