From 24e199fb592d45a7b78d8f5ff6bdde990485cd11 Mon Sep 17 00:00:00 2001 From: shaojiemike <943648187@qq.com> Date: Fri, 29 Mar 2024 10:39:43 +0800 Subject: [PATCH] fix: add missing img --- layouts/_default/single.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index bed8e98..af17ac6 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,7 +1,19 @@ {{ define "main" }}
-
- +
+ {{ with .Params.img_url }} + {{ $img := . }} + {{ if strings.HasPrefix $img "http://" -}} + + + {{ else if strings.HasPrefix $img "https://" -}} + + + {{ else -}} + + + {{ end }} + {{ end }}

{{ .Params.title }}