mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-05 02:29:44 +00:00
Merge pull request #2978 from ZhenShuo2021/featureimage
🐛 Fix: scope of featureimage in front matter
This commit is contained in:
9 files changed
+13
-9
No files matched your search
@@ -37,6 +37,7 @@
|
|||||||
{{ if not $target.Params.hideFeatureImage }}
|
{{ if not $target.Params.hideFeatureImage }}
|
||||||
{{/* frontmatter */}}
|
{{/* frontmatter */}}
|
||||||
{{ with $page }}
|
{{ with $page }}
|
||||||
|
{{ $p := . }}
|
||||||
{{ with .Params.featureimage }}
|
{{ with .Params.featureimage }}
|
||||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||||
{{ if site.Params.hotlinkFeatureImage }}
|
{{ if site.Params.hotlinkFeatureImage }}
|
||||||
@@ -45,7 +46,7 @@
|
|||||||
{{ $featured = resources.GetRemote . }}
|
{{ $featured = resources.GetRemote . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $featured = resources.Get . }}
|
{{ $featured = $p.Resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
{{ if eq $thumbnailAspectRatio "" }}{{ $thumbnailAspectRatio = "1.5" }}{{ end }}
|
{{ if eq $thumbnailAspectRatio "" }}{{ $thumbnailAspectRatio = "1.5" }}{{ end }}
|
||||||
{{/* frontmatter */}}
|
{{/* frontmatter */}}
|
||||||
{{ with $page }}
|
{{ with $page }}
|
||||||
|
{{ $p := . }}
|
||||||
{{ with .Params.featureimage }}
|
{{ with .Params.featureimage }}
|
||||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||||
{{ if site.Params.hotlinkFeatureImage }}
|
{{ if site.Params.hotlinkFeatureImage }}
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
{{ $featured = resources.GetRemote . }}
|
{{ $featured = resources.GetRemote . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $featured = resources.Get . }}
|
{{ $featured = $p.Resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
{{ if not .Params.hideFeatureImage }}
|
{{ if not .Params.hideFeatureImage }}
|
||||||
{{/* frontmatter */}}
|
{{/* frontmatter */}}
|
||||||
{{ with $page }}
|
{{ with $page }}
|
||||||
|
{{ $p := . }}
|
||||||
{{ with .Params.featureimage }}
|
{{ with .Params.featureimage }}
|
||||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||||
{{ if site.Params.hotlinkFeatureImage }}
|
{{ if site.Params.hotlinkFeatureImage }}
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
{{ $featured = resources.GetRemote . }}
|
{{ $featured = resources.GetRemote . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $featured = resources.Get . }}
|
{{ $featured = $p.Resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
{{ if not .Params.hideFeatureImage }}
|
{{ if not .Params.hideFeatureImage }}
|
||||||
{{/* frontmatter */}}
|
{{/* frontmatter */}}
|
||||||
{{ with $page }}
|
{{ with $page }}
|
||||||
|
{{ $p := . }}
|
||||||
{{ with .Params.featureimage }}
|
{{ with .Params.featureimage }}
|
||||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||||
{{ if site.Params.hotlinkFeatureImage }}
|
{{ if site.Params.hotlinkFeatureImage }}
|
||||||
@@ -38,7 +39,7 @@
|
|||||||
{{ $featured = resources.GetRemote . }}
|
{{ $featured = resources.GetRemote . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $featured = resources.Get . }}
|
{{ $featured = $p.Resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
{{ $featured = resources.GetRemote . }}
|
{{ $featured = resources.GetRemote . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $featured = resources.Get . }}
|
{{ $featured = page.Resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
{{ $featured = resources.GetRemote . }}
|
{{ $featured = resources.GetRemote . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $featured = resources.Get . }}
|
{{ $featured = page.Resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
{{ $featured = resources.GetRemote . }}
|
{{ $featured = resources.GetRemote . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $featured = resources.Get . }}
|
{{ $featured = page.Resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
{{ $featured = resources.GetRemote . }}
|
{{ $featured = resources.GetRemote . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $featured = resources.Get . }}
|
{{ $featured = page.Resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||||
{{ $featured = resources.GetRemote . }}
|
{{ $featured = resources.GetRemote . }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $featured = resources.Get . }}
|
{{ $featured = page.Resources.Get . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user