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> <!DOCTYPE html>
<html lang="ja"> <html lang="ja">
<head> <head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8"> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<meta property="og:title" content="{{ .Title }} | {{ .Site.Title }}" /> <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 }}" /> <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> <title>
{{ if eq .Url "/" }} {{ if ne .Url "/" }} {{ .Title }} &middot; {{ end }} {{ .Site.Title }}
{{ .Site.Title }}
{{ else }}
{{ .Title }} &middot; {{ .Site.Title }}
{{ end }}
</title> </title>
<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/bootstrap.min.css" /> <link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/bootstrap.min.css" />