mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-12-25 12:12:18 +00:00
Merge branch 'main' into drafts
This commit is contained in:
commit
22ecf60b33
1 changed files with 20 additions and 2 deletions
|
@ -23,16 +23,34 @@
|
||||||
<meta property="article:section" content="{{ .Section }}" />
|
<meta property="article:section" content="{{ .Section }}" />
|
||||||
{{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
|
{{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
|
||||||
{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
|
{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
|
||||||
|
{{ with .Params.thumbnail }}
|
||||||
|
{{/* $thumbPath := (add $.Page.RelPermalink . ) */}}
|
||||||
|
{{ $thumbnail := $.Resources.Get . }}
|
||||||
|
{{ with $thumbnail }}
|
||||||
|
{{ $img := $base.Filter (images.Overlay (.Process "fit 300x250") 875 38 )}}
|
||||||
|
{{ $img = $img.Filter (images.Text $.Page.Title (dict
|
||||||
|
"color" "#d8d8d8"
|
||||||
|
"size" 64
|
||||||
|
"linespacing" 2
|
||||||
|
"x" 40
|
||||||
|
"y" 300
|
||||||
|
"font" $font
|
||||||
|
))}}
|
||||||
|
{{ $img = resources.Copy (path.Join $.Page.RelPermalink "og.png") $img }}
|
||||||
|
{{ $.Scratch.Set "og_image" $img }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
{{ $img := $base.Filter (images.Text .Page.Title (dict
|
{{ $img := $base.Filter (images.Text .Page.Title (dict
|
||||||
"color" "#d8d8d8"
|
"color" "#d8d8d8"
|
||||||
"size" 64
|
"size" 64
|
||||||
"linespacing" 2
|
"linespacing" 2
|
||||||
"x" 40
|
"x" 40
|
||||||
"y" 240
|
"y" 300
|
||||||
"font" $font
|
"font" $font
|
||||||
))}}
|
))}}
|
||||||
{{ $img = resources.Copy (path.Join .Page.RelPermalink "og.png") $img }}
|
{{ $img = resources.Copy (path.Join $.Page.RelPermalink "og.png") $img }}
|
||||||
{{ .Scratch.Set "og_image" $img }}
|
{{ .Scratch.Set "og_image" $img }}
|
||||||
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ $img := .Scratch.Get "og_image" }}
|
{{ $img := .Scratch.Get "og_image" }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue