Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wangchucheng/hugo-eureka.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWang Chucheng <wangchucheng@outlook.com>2020-11-27 19:11:11 +0300
committerWang Chucheng <wangchucheng@outlook.com>2020-11-27 19:11:11 +0300
commite943060162dc4a3e91be78a060b0af185476ad7d (patch)
treedbf500696ebd216c1363cc03ec54feb7387fa5e7
parent68034e1009a9e9d3ae96d36b4f9f952800c1e7ef (diff)
fix: external images in config paramsv0.2.1
-rw-r--r--layouts/partials/get_image.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/partials/get_image.html b/layouts/partials/get_image.html
index 31e833c..59785f2 100644
--- a/layouts/partials/get_image.html
+++ b/layouts/partials/get_image.html
@@ -7,6 +7,8 @@
{{- end }}
{{- if $validKeyword }}
{{- $img = ((.context.Resources.ByType "image").GetMatch .keyword).Permalink }}
+{{- else if or (hasPrefix .url "//") (or (hasPrefix .url "http://") (hasPrefix .url "https://")) }}
+{{- $img = (.url | absURL) }}
{{- else if resources.GetMatch .url }}
{{- $img = (resources.GetMatch .url).Permalink }}
{{- else if .url }}