From 0e1ff20e27a5fc427c74717d16bebbe7d774479d Mon Sep 17 00:00:00 2001 From: Eltrac Date: Thu, 17 Jul 2025 10:21:51 +0800 Subject: refactor: remove img shortcode and enable markdown attribuets Former-commit-id: b01c58d9bb80f117d1181eb1d3b0b126ed0e7b44 --- layouts/_markup/render-image.html | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'layouts/_markup/render-image.html') diff --git a/layouts/_markup/render-image.html b/layouts/_markup/render-image.html index 21e574af..e2fbfd7f 100644 --- a/layouts/_markup/render-image.html +++ b/layouts/_markup/render-image.html @@ -1,16 +1,18 @@ {{- $src := .Destination -}} {{- $alt := .Text | default "" -}} {{- $caption := .Title | default "" -}} - -
+{{- $class := .Attributes.class | default "" -}} + +
+ {{ $alt }} - {{- if $caption }} -
-

{{ $caption | markdownify }}

-
- {{- end }} -
- + + {{- if $caption }} +
+

{{ $caption | markdownify }}

+
+ {{- end }} +
-- cgit v1.2.3