From 631547a75142326a7c71bdf123e1475217a5ad73 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 22 Apr 2026 12:42:56 +0200 Subject: chore: replace with extracted danix.xyz-hacker theme (danix2-hugo-theme) --- layouts/shortcodes/gallery.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'layouts/shortcodes/gallery.html') diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html index f9e546e..b66c327 100644 --- a/layouts/shortcodes/gallery.html +++ b/layouts/shortcodes/gallery.html @@ -1,3 +1,12 @@ -
- {{ .Inner }} +{{- $cols := .Get "cols" | default "2" -}} + +
+ {{- range $line := strings.Split .Inner "\n" -}} + {{- if strings.Contains $line "![" -}} + {{- $image := strings.TrimSpace $line -}} + {{- if $image -}} + {{ $image | markdownify | safeHTML }} + {{- end -}} + {{- end -}} + {{- end -}}
-- cgit v1.2.3