summaryrefslogtreecommitdiff
path: root/layouts/shortcodes/imgproc.html
diff options
context:
space:
mode:
authorMichał Sapka <michal@sapka.me>2023-01-19 22:33:36 +0100
committerMichał Sapka <michal@sapka.me>2023-01-19 22:33:36 +0100
commit36662ef4d3993b3fa6e7a1fa9519172cb68c1e26 (patch)
tree21498b2e084ea458e79eb35676c67fdf31f1cd3f /layouts/shortcodes/imgproc.html
parent1314cf4f87489ed903f5b09ccbffd4d52a07f48d (diff)
feat:article for 2023-01-19
Diffstat (limited to 'layouts/shortcodes/imgproc.html')
-rw-r--r--layouts/shortcodes/imgproc.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/layouts/shortcodes/imgproc.html b/layouts/shortcodes/imgproc.html
index c8f75c2..f271fd6 100644
--- a/layouts/shortcodes/imgproc.html
+++ b/layouts/shortcodes/imgproc.html
@@ -1,6 +1,8 @@
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }}
{{ $command := .Get 1 }}
{{ $options := .Get 2 }}
+{{ $caption := .Get 3 }}
+{{ $source := .Get 4 }}
{{ if eq $command "Fit"}}
{{ $img = $img.Fit $options }}
{{ else if eq $command "Resize"}}
@@ -15,6 +17,10 @@
<figure>
<img class="centered" src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}">
<figcaption>
- {{.Get 3}}
+ {{ $caption }}
+
+ {{- if $source }}
+ <a href="{{ $source }}" target="_blank" title="source">[source]</a>
+ {{ end }}
</figcaption>
</figure>