mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
fix(article-link): explicitly set featured priority
This commit is contained in:
@@ -33,9 +33,11 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $images := $target.Resources.ByType "image" }}
|
{{ $images := $target.Resources.ByType "image" }}
|
||||||
{{ $featured := $images.GetMatch "*feature*" }}
|
{{ $featured := "" }}
|
||||||
{{ $featuredURL := "" }}
|
{{ $featuredURL := "" }}
|
||||||
{{ if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end }}
|
{{ range slice "*feature*" "*cover*" "*thumbnail*" }}
|
||||||
|
{{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }}
|
||||||
|
{{ end }}
|
||||||
{{ if and $target.Params.featureimage (not $featured) }}
|
{{ if and $target.Params.featureimage (not $featured) }}
|
||||||
{{ $url:= $target.Params.featureimage }}
|
{{ $url:= $target.Params.featureimage }}
|
||||||
{{ $featured = resources.GetRemote $url }}
|
{{ $featured = resources.GetRemote $url }}
|
||||||
|
|||||||
@@ -4,9 +4,11 @@
|
|||||||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
||||||
|
|
||||||
{{ $images := $.Resources.ByType "image" }}
|
{{ $images := $.Resources.ByType "image" }}
|
||||||
{{ $featured := $images.GetMatch "*feature*" }}
|
{{ $featured := "" }}
|
||||||
{{ $featuredURL := "" }}
|
{{ $featuredURL := "" }}
|
||||||
{{ if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end }}
|
{{ range slice "*feature*" "*cover*" "*thumbnail*" }}
|
||||||
|
{{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }}
|
||||||
|
{{ end }}
|
||||||
{{ if and .Params.featureimage (not $featured) }}
|
{{ if and .Params.featureimage (not $featured) }}
|
||||||
{{ $url:= .Params.featureimage }}
|
{{ $url:= .Params.featureimage }}
|
||||||
{{ $featured = resources.GetRemote $url }}
|
{{ $featured = resources.GetRemote $url }}
|
||||||
|
|||||||
@@ -6,9 +6,11 @@
|
|||||||
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
|
||||||
|
|
||||||
{{ $images := $.Resources.ByType "image" }}
|
{{ $images := $.Resources.ByType "image" }}
|
||||||
{{ $featured := $images.GetMatch "*feature*" }}
|
{{ $featured := "" }}
|
||||||
{{ $featuredURL := "" }}
|
{{ $featuredURL := "" }}
|
||||||
{{ if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end }}
|
{{ range slice "*feature*" "*cover*" "*thumbnail*" }}
|
||||||
|
{{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }}
|
||||||
|
{{ end }}
|
||||||
{{ if and .Params.featureimage (not $featured) }}
|
{{ if and .Params.featureimage (not $featured) }}
|
||||||
{{ $url:= .Params.featureimage }}
|
{{ $url:= .Params.featureimage }}
|
||||||
{{ $featured = resources.GetRemote $url }}
|
{{ $featured = resources.GetRemote $url }}
|
||||||
|
|||||||
@@ -33,9 +33,11 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $images := $.Resources.ByType "image" }}
|
{{ $images := $.Resources.ByType "image" }}
|
||||||
{{ $featured := $images.GetMatch "*feature*" }}
|
{{ $featured := "" }}
|
||||||
{{ $featuredURL := "" }}
|
{{ $featuredURL := "" }}
|
||||||
{{ if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end }}
|
{{ range slice "*feature*" "*cover*" "*thumbnail*" }}
|
||||||
|
{{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }}
|
||||||
|
{{ end }}
|
||||||
{{ if and .Params.featureimage (not $featured) }}
|
{{ if and .Params.featureimage (not $featured) }}
|
||||||
{{ $url:= .Params.featureimage }}
|
{{ $url:= .Params.featureimage }}
|
||||||
{{ $featured = resources.GetRemote $url }}
|
{{ $featured = resources.GetRemote $url }}
|
||||||
|
|||||||
Reference in New Issue
Block a user