Files
docker-docs/layouts/shortcodes/inline-image.html
David Karlsson a0d21ade2f migrate to hugo
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-08-22 09:41:02 +02:00

15 lines
303 B
HTML

{{ $src := .Get "src" }}
{{ $alt := .Get "alt" }}
{{ $title := .Get "title" }}
{{ if and (eq .Page.Kind "page") (not (hasPrefix $src "/")) }}
{{ $src = (printf "../%s" $src) }}
{{ end }}
<img
src="{{ $src }}"
alt="{{ $alt }}"
{{ with $title }}title="{{ . }}"{{ end }}
class="inline my-0"
/>