1
Fork 0

Add metadata

This commit is contained in:
Jake Howard 2017-11-11 21:53:54 +00:00
parent 8d2a0ab33f
commit eb611c88f2
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 41 additions and 0 deletions

View file

@ -7,6 +7,7 @@ params:
author_name: Jake Howard author_name: Jake Howard
nav_items: 5 nav_items: 5
index_items: 6 index_items: 6
iso8601: "2006-01-02T15:04:05"
summaryLength: 40 summaryLength: 40

View file

@ -11,6 +11,8 @@
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/style.css" /> <link rel="stylesheet" href="{{ .Site.BaseURL }}/css/style.css" />
<title>{{ .Title }} :: {{ .Site.Title }}</title> <title>{{ .Title }} :: {{ .Site.Title }}</title>
{{ partial "metadata.html" . }}
</head> </head>
<body> <body>

View file

@ -0,0 +1,38 @@
<meta name="twitter:dnt" content="on" />
<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 | htmlUnescape }}" />
<meta name="twitter:description" content="{{ .Summary | plainify | chomp | htmlUnescape }}{{ if .Truncated }}...{{ end }}" />
<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="{{ .Title | htmlUnescape }}" />
{{ end }}
<meta property="og:title" content="{{ .Title | htmlUnescape }}" />
<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 | plainify | chomp | htmlUnescape }}{{ if .Truncated }}...{{ end }}" />
<meta property="og:site_name" content="{{ title .Site.Title | htmlUnescape }}" />
<meta property="og:locale" content="{{ .Site.Language.Lang }}" />
<meta itemprop="name" content="{{ .Title | htmlUnescape }}" />
<meta itemprop="description" content="{{ .Summary | plainify | chomp | htmlUnescape }}{{ if .Truncated }}...{{ end }}" />
{{ 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.Format .Site.Params.iso8601 }}" />
<meta name="article:published_time" content="{{ .Date.Format .Site.Params.iso8601 }}" />
<meta name="article:section" content="{{ .Type }}" />
<meta name="description" content="{{ .Summary | plainify | chomp | htmlUnescape }}{{ if .Truncated }}...{{ end }}" />
<meta name="author" content="{{ title .Site.Params.author }}" />
<meta name="canonical" content="{{ .Permalink }}" />
{{ range .AlternativeOutputFormats }}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}">
{{ end }}