File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ theme = "hugoplate"
99timeZone = " Europe/Berlin"
1010# post excerpt
1111summaryLength = 10 # see https://gohugo.io/content-management/excerpts/
12+
13+ # Timeout settings
14+ [timeout ]
15+ template = " 120s"
1216# disable language
1317disableLanguages = [
1418] # example: ["fr"] for disable french language. see https://gohugo.io/content-management/multilingual/
Original file line number Diff line number Diff line change 1717< meta property ="og:site_name " content ="{{ site.Title }} " />
1818
1919{{- with .Params.image -}}
20- < meta property ="og:image " content ="{{ . | absURL }} " />
20+ {{- $imageUrl := . | absURL -}}
21+ {{- if not (hasPrefix . "http") -}}
22+ {{- $resourcePath := strings.TrimPrefix "/" . -}}
23+ {{- with resources.Get $resourcePath -}}
24+ {{- $resized := .Fill "1200x630 q85" -}}
25+ {{- $imageUrl = $resized.Permalink -}}
26+ {{- end -}}
27+ {{- end -}}
28+ < meta property ="og:image " content ="{{ $imageUrl }} " />
2129 < meta property ="og:image:width " content ="1200 " />
2230 < meta property ="og:image:height " content ="630 " />
2331{{- end -}}
2836< meta name ="twitter:title " content ="{{ $title }} " />
2937< meta name ="twitter:description " content ="{{ $description }} " />
3038{{- with .Params.image -}}
31- < meta name ="twitter:image " content ="{{ . | absURL }} " />
39+ {{- $imageUrl := . | absURL -}}
40+ {{- if not (hasPrefix . "http") -}}
41+ {{- $resourcePath := strings.TrimPrefix "/" . -}}
42+ {{- with resources.Get $resourcePath -}}
43+ {{- $resized := .Fill "1200x630 q85" -}}
44+ {{- $imageUrl = $resized.Permalink -}}
45+ {{- end -}}
46+ {{- end -}}
47+ < meta name ="twitter:image " content ="{{ $imageUrl }} " />
3248{{- end -}}
You can’t perform that action at this time.
0 commit comments