Add an inline <img> in the photo Atom entry
This commit is contained in:
parent
2a796299a5
commit
5fb1070178
1 changed files with 7 additions and 1 deletions
|
@ -3,6 +3,12 @@
|
||||||
{{ partial "atom_entry_metadata.xml" . }}
|
{{ partial "atom_entry_metadata.xml" . }}
|
||||||
<link rel="enclosure" href="{{ $thumbnail.Permalink }}" type="{{ $thumbnail.MediaType }}" length="{{ len $thumbnail.Content }}" />
|
<link rel="enclosure" href="{{ $thumbnail.Permalink }}" type="{{ $thumbnail.MediaType }}" length="{{ len $thumbnail.Content }}" />
|
||||||
{{ if .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 }}
|
{{ end }}
|
||||||
</entry>
|
</entry>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue