mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-01 00:35:54 +00:00
Add remote image support to author image
This commit is contained in:
1 parent
10bf07a7b7
commit
3b0393d553
1 file changed
+7
-2
@@ -1,7 +1,12 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
<div class="flex author">
|
||||
{{ with .Site.Author.image }}
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ $authorImage := "" }}
|
||||
{{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }}
|
||||
{{ $authorImage = resources.GetRemote . }}
|
||||
{{ else }}
|
||||
{{ $authorImage = resources.Get . }}
|
||||
{{ end }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
{{ $authorImage = $authorImage.Fill "192x192" }}
|
||||
@@ -31,4 +36,4 @@
|
||||
{{ end }}
|
||||
<div class="text-2xl sm:text-lg">{{ partialCached "author-links.html" . }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user