Add more meta tags
This commit is contained in:
parent
c61e850d2e
commit
fb9d777958
|
@ -5,16 +5,47 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta property="og:title" content="{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}"/>
|
||||
{{ if .IsPage }}
|
||||
<meta property="og:description" content="{{ if .IsPage }}{{ .Description }}{{end}}" />
|
||||
{{ end }}
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}"/>
|
||||
<meta property="og:url" content="{{ .Permalink }}"/>
|
||||
<meta property="og:image" content="{{ .Site.BaseURL }}images/vikunja.png"/>
|
||||
{{ hugo.Generator }}
|
||||
|
||||
<title>{{ if and (not .IsHome) .Title }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
|
||||
<!-- Title -->
|
||||
{{ $title := .Site.Title}}
|
||||
{{ if and (not .IsHome) .Title }}
|
||||
{{ $title = printf "%s | %s" .Title .Site.Title}}
|
||||
{{ end }}
|
||||
<title>{{ $title }}</title>
|
||||
<meta property="og:title" content="{{ $title }}" />
|
||||
<meta name="twitter:title" content="{{ $title }}" />
|
||||
<meta itemprop="name" content="{{ $title }}" />
|
||||
<meta name="application-name" content="{{ $title }}" />
|
||||
|
||||
<!-- Description -->
|
||||
<meta name="description" content="{{ .Params.description }}" />
|
||||
<meta itemprop="description" content="{{ .Params.description }}" />
|
||||
<meta property="og:description" content="{{ .Params.description }}" />
|
||||
<meta name="twitter:description" content="{{ .Params.description }}" />
|
||||
|
||||
<!-- Links -->
|
||||
<base href="{{ .Permalink }}">
|
||||
<link rel="canonical" href="{{ .Permalink }}" itemprop="url" />
|
||||
<meta name="url" content="{{ .Permalink }}" />
|
||||
<meta name="twitter:url" content="{{ .Permalink }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
|
||||
<!-- Images -->
|
||||
{{ with .Params.image }}
|
||||
<meta itemprop="image" content="{{ . | absURL }}" />
|
||||
<meta property="og:image" content="{{ . | absURL }}" />
|
||||
<meta name="twitter:image" content="{{ . | absURL }}" />
|
||||
<meta name="twitter:image:src" content="{{ . | absURL }}" />
|
||||
{{ else }}
|
||||
<meta itemprop="image" content="{{ .Site.Params.ogimage | absURL }}images/vikunja.png" />
|
||||
<meta property="og:image" content="{{ .Site.Params.ogimage | absURL }}images/vikunja.png" />
|
||||
<meta name="twitter:image" content="{{ .Site.Params.ogimage | absURL }}images/vikunja.png" />
|
||||
<meta name="twitter:image:src" content="{{ .Site.Params.ogimage | absURL }}images/vikunja.png" />
|
||||
{{ end }}
|
||||
|
||||
<!-- Misc -->
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}"/>
|
||||
{{ hugo.Generator }}
|
||||
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
|
|
Loading…
Reference in New Issue