Add OGP tags

This commit is contained in:
Keichi Takahashi 2015-02-03 23:53:05 +09:00
parent 2b9af7924a
commit df7f7d6cf3

View File

@ -1,17 +1,26 @@
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta property="og:title" content="{{ .Title }} | {{ .Site.Title }}" />
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<meta property="og:title" content="{{ if ne .Url "/" }} {{ .Title }} &middot; {{ end }} {{ .Site.Title }}" />
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ if .IsPage }}
<meta property="og:type" content="article" />
{{ with .Site.Params.facebook }}
<meta property="og:article:author" content="https://facebook.com/{{ . }}" />
{{ end }}
<meta property="og:article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHtml }}" />
{{ range .Params.tags }}
<meta property="og:article:tag" content="{{ . }}" />
{{ end }}
{{ else }}
<meta property="og:type" content="website" />
{{ end }}
<title>
{{ if eq .Url "/" }}
{{ .Site.Title }}
{{ else }}
{{ .Title }} &middot; {{ .Site.Title }}
{{ end }}
{{ if ne .Url "/" }} {{ .Title }} &middot; {{ end }} {{ .Site.Title }}
</title>
<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/bootstrap.min.css" />