mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 13:25:57 -06:00
Update og:video code
This commit is contained in:
parent
b2a5a6acaf
commit
3242d892b5
@ -27,15 +27,15 @@
|
||||
{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }}
|
||||
{{- with .Site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }}
|
||||
|
||||
{{- with .Params.videos -}}
|
||||
{{- range first 6 . }}<meta property="og:video" content="{{ . | absURL }}" />{{ end -}}
|
||||
{{- else -}}
|
||||
{{- $videos := $.Resources.ByType "video" -}}
|
||||
{{- $featured_video := $videos.GetMatch "*feature*" -}}
|
||||
{{- if not $featured_video }}{{ $featured_video = $videos.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
||||
{{- with $featured_video -}}
|
||||
<meta property="og:video" content="{{ $featured_video.Permalink | absURL }}" />
|
||||
{{- else -}}
|
||||
{{- with .Params.videos }}{{- range . }}
|
||||
<meta property="og:video" content="{{ . | absURL }}" />
|
||||
{{ end }}{{ end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* If it is part of a series, link to related articles */}}
|
||||
|
Loading…
Reference in New Issue
Block a user