-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathfeed.xml
56 lines (53 loc) · 2.6 KB
/
feed.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<generator uri="https://github.com/waschinski/photo-stream">Photo Stream</generator>
<link href="{{ site.env.URL }}/feed.xml" rel="self" type="application/atom+xml" />
<link href="{{ site.env.URL }}" rel="alternate" type="text/html"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.time | date_to_xmlschema }}</id>
<title type="html"><![CDATA[{{ site.env.TITLE}}]]></title>
<subtitle><![CDATA[{{ site.env.DESCRIPTION }}]]></subtitle>
{% if site.env.AUTHOR_NAME or site.env.AUTHOR_EMAIL or site.env.AUTHOR_WEBSITE %}
<author>
{% if site.env.AUTHOR_NAME %}
<name><![CDATA[{{ site.env.AUTHOR_NAME }}]]></name>
{% endif %}
{% if site.env.AUTHOR_EMAIL %}
<email>{{ site.env.AUTHOR_EMAIL }}</email>
{% endif %}
{% if site.env.AUTHOR_WEBSITE %}
<uri>{{ site.env.AUTHOR_WEBSITE }}</uri>
{% endif %}
</author>
{% endif %}
{% assign images = site.static_files | photo_filter %}
{% for image in images limit: 20 %}
{% capture image_path %}photos/original/{{ image.name }}{% endcapture %}
<entry>
<title type="html">{{ image.name | strip_extension }}</title>
<link href="{{ site.env.URL }}/{{ image.name | strip_extension | slugify }}/" rel="alternate" type="text/html" title="{{ image.name | strip_extension }}" />
<published>{{ image_path | exif: 'date_time' | date_to_xmlschema}}</published>
<updated>{{ image_path | exif: 'date_time' | date_to_xmlschema}}</updated>
<id>{{ site.env.URL }}/{{ image.name | strip_extension | slugify }}/</id>
<content type="html"><![CDATA[<figure><a href="{{ site.env.URL }}/{{ image.name | strip_extension | slugify }}/"><img src="{{ site.env.URL }}{{ image.name | uri_escape | processed_path: 'large' }}" alt="{{ image.name | strip_extension }}" /></a></figure>]]>
</content>
{% if site.env.AUTHOR_NAME %}
<author>
{% if site.env.AUTHOR_NAME %}
<name><![CDATA[{{ site.env.AUTHOR_NAME }}]]></name>
{% endif %}
{% if site.env.AUTHOR_EMAIL %}
<email>{{ site.env.AUTHOR_EMAIL }}</email>
{% endif %}
{% if site.env.AUTHOR_WEBSITE %}
<uri>{{ site.env.AUTHOR_WEBSITE }}</uri>
{% endif %}
</author>
{% endif %}
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ site.env.URL }}{{ image.name | uri_escape | processed_path: 'large' }}" />
<media:content medium="image" url="{{ site.env.URL }}{{ image.name | uri_escape | processed_path: 'large' }}" xmlns:media="http://search.yahoo.com/mrss/" />
</entry>
{% endfor %}
</feed>