Add OGP tags
This commit is contained in:
parent
2b9af7924a
commit
df7f7d6cf3
@ -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 }} · {{ 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 }} · {{ end }} {{ .Site.Title }}
|
||||||
{{ .Site.Title }}
|
|
||||||
{{ else }}
|
|
||||||
{{ .Title }} · {{ .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" />
|
||||||
|
Loading…
Reference in New Issue
Block a user