AstraOS commited on
Commit
4c58c3e
·
verified ·
1 Parent(s): 514fdfe

Update app/themes/hugo-theme-stack/layouts/partials/head/opengraph/provider/base.html

Browse files
app/themes/hugo-theme-stack/layouts/partials/head/opengraph/provider/base.html CHANGED
@@ -37,15 +37,22 @@
37
  {{- end -}} -->
38
 
39
  {{- $lastmod := now -}}
40
- {{- range .Site.RegularPages -}}
41
- {{- if gt .Lastmod $lastmod -}}
42
- {{- $lastmod = .Lastmod -}}
 
 
 
 
43
  {{- end -}}
44
  {{- end -}}
45
- {{- if gt $lastmod (time "2000-01-01") -}}
46
  <meta property='og:updated_time' content='{{ $lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
 
 
47
  {{- end -}}
48
 
 
49
  {{- end -}}
50
 
51
  {{ $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }}
 
37
  {{- end -}} -->
38
 
39
  {{- $lastmod := now -}}
40
+ {{- with .Site.RegularPages -}}
41
+ {{- range . -}}
42
+ {{- with .Lastmod -}}
43
+ {{- if and (not .IsZero) (gt . $lastmod) -}}
44
+ {{- $lastmod = . -}}
45
+ {{- end -}}
46
+ {{- end -}}
47
  {{- end -}}
48
  {{- end -}}
49
+ {{- if and $lastmod (gt $lastmod (time "2000-01-01")) -}}
50
  <meta property='og:updated_time' content='{{ $lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
51
+ {{- else -}}
52
+ <meta property='og:updated_time' content='2000-01-01T00:00:00+00:00'/>
53
  {{- end -}}
54
 
55
+
56
  {{- end -}}
57
 
58
  {{ $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }}