From a184cfd41e5d4e9f2c154c497907ae092fffc11c Mon Sep 17 00:00:00 2001 From: Xin Date: Wed, 13 Sep 2023 05:40:00 -0400 Subject: [PATCH] fix: use relURL only for link starts with slash (#54) --- layouts/shortcodes/card.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/card.html b/layouts/shortcodes/card.html index 751614da..eda06e30 100644 --- a/layouts/shortcodes/card.html +++ b/layouts/shortcodes/card.html @@ -11,11 +11,11 @@ {{- end -}} {{- $external := strings.HasPrefix $link "http" -}} - +{{- $href := cond (strings.HasPrefix $link "/") ($link | relURL) $link -}}