From 1757e6115876be6a8a495062d189b32a938a1ae7 Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Sat, 8 Jan 2022 12:16:27 +0100 Subject: [PATCH] initial support for img (later vid) and its attributes... --- layouts/_default/_markup/render-image.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 5e617f7..38fc03f 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -5,7 +5,12 @@ {{ $_.Add "triads" $k }} {{- end -}} -{{- if strings.HasPrefix .Destination "bib:" -}} +{{- if strings.HasPrefix .Destination "img:" -}} + {{- $img_params := (substr .Destination 4) -}} + {{- $img_src := index (split $img_params " ") 0 -}} + {{- $img_attr := index (split $img_params $img_src) 1 -}} + +{{- else if strings.HasPrefix .Destination "bib:" -}} {{- $destination := (substr .Destination 4) -}} {{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}} {{- if index $.Page.Site.Data.books.catalog $destination -}}