added opengraph metadata to head when relevant
This commit is contained in:
parent
6a4c92c4ec
commit
fd0cf72329
|
@ -28,4 +28,20 @@
|
|||
{{ $style := resources.Get "/scss/style.scss" | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") | resources.Fingerprint "sha512" }}
|
||||
<link type=text/css rel=stylesheet href={{ $style.Permalink }} integrity="{{ $style.Data.Integrity }}" />
|
||||
{{- partial "inject/head.html" . -}}
|
||||
<meta property="og:site_name" content='{{ .Site.Title | default "Ficurinia" }}' />
|
||||
{{ if .IsPage }}
|
||||
<meta property="og:title" content="{{ .Title }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
|
||||
<meta property="og:type:article:author" content="{{ .Site.Params.Author }}" />
|
||||
<meta property="og:type:article:published_time" content='{{ .Date.Format "2006-01-02T15:04:05Z-0700" }}' />
|
||||
{{ range .Params.tags }}
|
||||
<meta property="og:type:article:tag" content="{{ . }}" />
|
||||
{{ end }}
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
<meta property="og:image" content='{{ if .Params.Image }}{{ .Params.Image | absURL }}{{ else }}{{ .Site.Params.Logo | default "/img/icon.svg" | absURL }}{{ end }}' />
|
||||
<meta property="og:description" content="{{ .Summary }}" />
|
||||
{{ else }}
|
||||
<meta property="og:image" content='{{ .Site.Params.Logo | default "/img/icon.svg" | absURL }}' />
|
||||
{{ end }}
|
||||
</head>
|
||||
|
|
Loading…
Reference in New Issue