Add a set of templates to generate an Atom feed!
This commit is contained in:
parent
6c5fa3c81a
commit
762e657c98
4 changed files with 53 additions and 0 deletions
8
layouts/photos/atom_entry.xml
Normal file
8
layouts/photos/atom_entry.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
{{- $thumbnail := partial "images/photo_thumbnail.html" . -}}
|
||||
<entry>
|
||||
{{ 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>
|
||||
{{ end }}
|
||||
</entry>
|
Loading…
Add table
Add a link
Reference in a new issue