mirror of https://github.com/jpanther/congo.git
20 lines
708 B
HTML
20 lines
708 B
HTML
{{ $altText := .Text }}
|
|
{{ $caption := .Title }}
|
|
{{ with $.Page.Resources.GetMatch (.Destination) }}
|
|
<figure>
|
|
<img
|
|
class="my-0 rounded-md"
|
|
srcset="
|
|
{{ (.Resize "330x").RelPermalink }} 330w,
|
|
{{ (.Resize "660x").RelPermalink }} 660w,
|
|
{{ (.Resize "1024x").RelPermalink }} 1024w,
|
|
{{ (.Resize "1320x").RelPermalink }} 2x"
|
|
src="{{ (.Resize "660x").RelPermalink }}"
|
|
alt="{{ $altText }}"
|
|
/>
|
|
<figcaption>{{ $caption | markdownify }}</figcaption>
|
|
</figure>
|
|
{{ else }}
|
|
{{ errorf `[CONGO] Markdown image error in "%s": Resource "%s" not found. Check the path is correct or remove the image from the content.` .Page.Path .Destination }}
|
|
{{ end }}
|