Add metatag data
This commit is contained in:
parent
44323afd5b
commit
0874f57d92
2 changed files with 36 additions and 0 deletions
|
@ -3,4 +3,6 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="/css/style.css" />
|
||||
|
||||
{{ partial "metadata.html" . }}
|
||||
</head>
|
||||
|
|
34
layouts/partials/metadata.html
Normal file
34
layouts/partials/metadata.html
Normal 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 }}" />
|
Loading…
Reference in a new issue