Add OGP tags
This commit is contained in:
parent
2b9af7924a
commit
df7f7d6cf3
@ -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 }} · {{ 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 }} · {{ .Site.Title }}
|
||||
{{ end }}
|
||||
{{ if ne .Url "/" }} {{ .Title }} · {{ end }} {{ .Site.Title }}
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/bootstrap.min.css" />
|
||||
|
Loading…
Reference in New Issue
Block a user