2023-10-11 21:55:42 +02:00
|
|
|
{{- $imagename := .Destination }}
|
|
|
|
{{- $text := .Text }}
|
|
|
|
{{- $title := .Title }}
|
|
|
|
{{- $isBundle := ne .Page.BundleType "" }}
|
|
|
|
|
|
|
|
{{- $page := .Page }}
|
|
|
|
{{- if not $isBundle }}
|
2023-11-03 20:36:12 +01:00
|
|
|
{{- $page_dir := path.Dir .Page.File }}
|
|
|
|
{{- $pagebundle_path := path.Join "/" $page_dir }}
|
|
|
|
{{- $page = .Page.Site.GetPage $pagebundle_path }}
|
2023-10-11 21:55:42 +02:00
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- with $page.Resources.Get $imagename }}
|
|
|
|
<p class="md-img">
|
|
|
|
<img src="{{ .RelPermalink }}" alt="{{ $text }}" {{ with $title }} title="{{ . }}"{{ end }} />
|
|
|
|
</p>
|
|
|
|
{{- end }}
|