diff options
author | amzrk2 | 2020-07-24 09:17:09 +0800 |
---|---|---|
committer | amzrk2 | 2020-07-24 09:17:09 +0800 |
commit | 9897eff5d4fe78e26efd5e362cd32672575fae14 (patch) | |
tree | b0ecc5483044a81e8185a2606ded2084ea6b0db7 /layouts/shortcodes/img-nz.html | |
parent | 3483f357ac417d7418461c01a5ab1cfc91816431 (diff) | |
download | hugo-theme-fuji-9897eff5d4fe78e26efd5e362cd32672575fae14.tar.gz hugo-theme-fuji-9897eff5d4fe78e26efd5e362cd32672575fae14.tar.bz2 hugo-theme-fuji-9897eff5d4fe78e26efd5e362cd32672575fae14.zip |
Fix image relative link issue
Diffstat (limited to 'layouts/shortcodes/img-nz.html')
-rw-r--r-- | layouts/shortcodes/img-nz.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/shortcodes/img-nz.html b/layouts/shortcodes/img-nz.html index 30ea28a..2e4b3af 100644 --- a/layouts/shortcodes/img-nz.html +++ b/layouts/shortcodes/img-nz.html @@ -1,7 +1,7 @@ {{ if (index .Params 2) }} <a href="{{ index .Params 2 }}" target="_blank"> - <img src="{{ index .Params 1 }}" alt="{{ index .Params 0 }}" /> + <img src="{{ index .Params 1 | relURL | safeURL }}" alt="{{ index .Params 0 }}" /> </a> {{ else }} -<img src="{{ index .Params 1 }}" alt="{{ index .Params 0 }}" /> +<img src="{{ index .Params 1 | relURL | safeURL }}" alt="{{ index .Params 0 }}" /> {{ end }} |