Add an inline <img> in the photo Atom entry

This commit is contained in:
Eryn Wells 2022-11-03 17:04:18 -07:00
parent 2a796299a5
commit 5fb1070178

View file

@ -3,6 +3,12 @@
{{ partial "atom_entry_metadata.xml" . }}
<link rel="enclosure" href="{{ $thumbnail.Permalink }}" type="{{ $thumbnail.MediaType }}" length="{{ len $thumbnail.Content }}" />
{{ if .Content }}
{{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
{{- $inlineThumbnail := partial "images/photo_thumbnail.html" (dict "Page" . "Width" 1280 "Height" 1280) -}}
<content type="html">{{ `<![CDATA[` | safeHTML }}
{{- with $inlineThumbnail -}}
<img src="{{ .Permalink }}">
{{- end -}}
{{- .Content -}}
]]></content>
{{ end }}
</entry>