AstraOS commited on
Commit
7365800
·
verified ·
1 Parent(s): 6cb9eb8

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

Browse files
hugo-theme-stack/layouts/partials/head/opengraph/provider/base.html CHANGED
@@ -32,8 +32,17 @@
32
  <meta property='article:modified_time' content='{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
33
  {{- end -}}
34
  {{- else -}}
35
- {{- if not .Site.Lastmod.IsZero -}}
36
  <meta property='og:updated_time' content='{{ .Site.Lastmod.Format " 2006-01-02T15:04:05-07:00 " | safeHTML }}'/>
 
 
 
 
 
 
 
 
 
37
  {{- end -}}
38
  {{- end -}}
39
 
 
32
  <meta property='article:modified_time' content='{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
33
  {{- end -}}
34
  {{- else -}}
35
+ <!-- {{- if not .Site.Lastmod.IsZero -}}
36
  <meta property='og:updated_time' content='{{ .Site.Lastmod.Format " 2006-01-02T15:04:05-07:00 " | safeHTML }}'/>
37
+ {{- end -}} -->
38
+ {{- $lastmod := now -}}
39
+ {{- range .Site.RegularPages -}}
40
+ {{- if gt .Lastmod $lastmod -}}
41
+ {{- $lastmod = .Lastmod -}}
42
+ {{- end -}}
43
+ {{- end -}}
44
+ {{- if gt $lastmod (time "2000-01-01") -}}
45
+ <meta property='og:updated_time' content='{{ $lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
46
  {{- end -}}
47
  {{- end -}}
48