fix: metas and opengraph
All checks were successful
Deploy workflow / deploy (push) Successful in 35s
All checks were successful
Deploy workflow / deploy (push) Successful in 35s
This commit is contained in:
parent
ae2accd6db
commit
ac68014559
9 changed files with 15 additions and 28 deletions
|
|
@ -17,25 +17,25 @@
|
|||
|
||||
<meta property="og:locale" content="{{ .Site.LanguageCode }}">
|
||||
|
||||
{{- if .IsPage -}}
|
||||
{{ if .IsPage }}
|
||||
<meta property="article:section" content="{{ .Section | title }}" />
|
||||
{{- range .Params.tags -}}
|
||||
<meta property="article:tag" content="{{ . }}" />
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{- if .IsPage -}}
|
||||
{{ if .IsPage }}
|
||||
{{- if not .Date.IsZero -}}
|
||||
<meta property="article:published_time" content="{{- .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}" />
|
||||
{{- end -}}
|
||||
{{- if not .Lastmod.IsZero -}}
|
||||
<meta property="article:modified_time" content="{{- .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}" />
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ else }}
|
||||
{{ if not .Site.LastChange.IsZero }}
|
||||
<meta property="og:updated_time" content="{{- .Site.LastChange.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}" />
|
||||
<meta property="og:updated_time" content="{{- .Site.LastChange.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}" />
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{ $image := partial "helpers/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }}
|
||||
{{ if $image.exists }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue