Skip to content

Commit

Permalink
fix: external images in config params
Browse files Browse the repository at this point in the history
  • Loading branch information
wangchucheng committed Nov 27, 2020
1 parent 68034e1 commit e943060
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions layouts/partials/get_image.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit e943060

Please sign in to comment.