Adding open graph data and twitter card data in header
This commit is contained in:
parent
ebe22ea7c7
commit
c0904b4b77
2 changed files with 22 additions and 1 deletions
|
@ -1,9 +1,11 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Common app data -->
|
||||||
{{ $lang := .Site.Language.Lang }}
|
{{ $lang := .Site.Language.Lang }}
|
||||||
{{ $appindex := .Params.SectionHeader.AppIndex }}
|
{{ $appindex := .Params.SectionHeader.AppIndex }}
|
||||||
{{ $i18nData := index .Site.Data $lang }}
|
{{ $i18nData := index .Site.Data $lang }}
|
||||||
{{ $i18nAppData := index $i18nData.apps $appindex }}
|
{{ $i18nAppData := index $i18nData.apps $appindex }}
|
||||||
{{ $AppData := index .Site.Data.metadata $appindex }}
|
{{ $AppData := index .Site.Data.metadata $appindex }}
|
||||||
|
<!-- Store disclaimers -->
|
||||||
{{ $disclaimers := newScratch }}
|
{{ $disclaimers := newScratch }}
|
||||||
{{ $disclaimers.Set "snapcraft" false }}
|
{{ $disclaimers.Set "snapcraft" false }}
|
||||||
{{ $disclaimers.Set "firefox" false }}
|
{{ $disclaimers.Set "firefox" false }}
|
||||||
|
|
|
@ -16,12 +16,31 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $printstyle := resources.Get "/scss/print.scss" | toCSS | minify }}
|
{{ $printstyle := resources.Get "/scss/print.scss" | toCSS | minify }}
|
||||||
<link rel="stylesheet" href="{{ $printstyle.Permalink }}" media="print">
|
<link rel="stylesheet" href="{{ $printstyle.Permalink }}" media="print">
|
||||||
<link rel="icon" href="/img/logo.png">
|
<link rel="icon" href="/img/logo.svg" type="image/svg+xml">
|
||||||
|
<link rel="alternate icon" href="/img/logo.png" type="image/png">
|
||||||
{{ hugo.Generator }}
|
{{ hugo.Generator }}
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="author" content="Ad5001">
|
||||||
<meta name="description" content="{{ .Page.Description }}">
|
<meta name="description" content="{{ .Page.Description }}">
|
||||||
|
<meta name="keywords" content="ad5001,programing{{ if .Params.Tags }},{{ .Params.Tags }}{{ end }}">
|
||||||
|
<meta name="theme-color" content="#50DC71">
|
||||||
|
<!-- Twitter cards -->
|
||||||
|
<meta name="twitter:card" content="summary">
|
||||||
|
<meta name="twitter:site" content="@Ad5001P4F">
|
||||||
|
<meta name="twitter:description" content="{{ .Page.Description }}">
|
||||||
|
<meta name="twitter:title" content="{{ .Site.Title }} - {{ .Title }}">
|
||||||
|
<meta name="twitter:image" content="{{ if .Params.HeaderImage }}{{ .Site.BaseURL }}{{ .Params.HeaderImage }}{{ else }}https://ad5001.eu/img/logo.png{{ end }}">
|
||||||
|
<!-- open graph -->
|
||||||
|
<meta property="og:title" content="{{ .Site.Title }} - {{ .Title }}">
|
||||||
|
<meta property="og:site_name" content="Ad5001">
|
||||||
|
<meta property="og:url" content="{{ .Permalink }}">
|
||||||
|
<meta property="og:locale" content="{{ .Site.Language.Lang }}">
|
||||||
|
<meta property="og:description" content="{{ .Description }}">
|
||||||
|
<meta property="og:type" content="website">
|
||||||
|
<meta property="og:image" content="{{ if .Params.HeaderImage }}{{ .Site.BaseURL }}{{ .Params.HeaderImage }}{{ else }}https://ad5001.eu/img/logo.png{{ end }}">
|
||||||
{{ if .IsTranslated }}
|
{{ if .IsTranslated }}
|
||||||
{{ range .Translations }}
|
{{ range .Translations }}
|
||||||
|
<meta property="og:locale:alternate" content="{{ .Language.Lang }}">
|
||||||
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ .Language.LanguageName }}">
|
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ .Language.LanguageName }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue