Added og:description and og:image (for blog posts)
This commit is contained in:
parent
4e68e3f610
commit
ce9da7ec25
|
@ -17,11 +17,13 @@
|
|||
{{ end }}
|
||||
|
||||
<meta property="og:title" content="{{ if ne .URL "/" }} {{ .Title }} · {{ end }} {{ .Site.Title }}" />
|
||||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
|
||||
{{ if (eq .Section "entry") | or (eq .Section "wiki") }}
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:image" content="{{ .Site.BaseURL }}images/banners/{{ .Params.Banner | default (print .File.BaseFileName ".png") }}" />
|
||||
<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="{{ . }}" />
|
||||
|
|
Reference in New Issue