1
Fork 0

Add metatag data

This commit is contained in:
Jake Howard 2017-04-30 10:31:52 +01:00
parent 44323afd5b
commit 0874f57d92
2 changed files with 36 additions and 0 deletions

View file

@ -3,4 +3,6 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/css/style.css" /> <link rel="stylesheet" href="/css/style.css" />
{{ partial "metadata.html" . }}
</head> </head>

View file

@ -0,0 +1,34 @@
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="{{ .Site.Data.social.accounts.twitter.username }}" />
<meta name="twitter:title" content="{{ .Title }}" />
<meta name="twitter:description" content="{{ .Summary }}" />
<meta name="twitter:creator" content="{{ .Site.Data.social.accounts.twitter.username }}" />
{{ if .Params.image }}
<meta name="twitter:image" content="{{ absURL .Params.image }}" />
<meta name="twitter:image:alt" content="{{ .Summary }}" />
{{ end }}
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:type" content="{{ .Kind }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ if .Params.image }}
<meta property="og:image" content="{{ absURL .Params.image }}" />
{{ end }}
<meta property="og:description" content="{{ .Summary }}" />
<meta property="og:site_name" content="{{ title .Site.Title }}" />
<meta property="og:locale" content="{{ .Site.Language.Lang }}" />
<meta itemprop="name" content="{{ .Title }}" />
<meta itemprop="description" content="{{ .Summary }}" />
{{ if .Params.image }}
<meta itemprop="image" content="{{ absURL .Params.image }}" />
{{ end }}
<meta name="article:author" content="{{ title .Site.Params.author }}" />
<meta name="article:modified_time" content="{{ .Lastmod }}" />
<meta name="article:published_time" content="{{ .Date }}" />
<meta name="article:section" content="{{ .Type }}" />
<meta name="description" content="{{ .Summary }}" />
<meta name="author" content="{{ title .Site.Params.author }}" />
<meta name="canonical" content="{{ .Site.BaseURL }}" />