forked from studioprisoner/photo-stream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.xml
57 lines (54 loc) · 2.36 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
57
---
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<generator uri="https://github.com/maxvoltar/photo-stream">Photo Stream by @maxvoltar</generator>
<link href="{{ site.url }}feed.xml" rel="self" type="application/atom+xml" />
<link href="{{ site.url }}" rel="alternate" type="text/html"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.time | date_to_xmlschema }}</id>
<title type="html">{{ site.title}}</title>
<subtitle>{{ site.description }}</subtitle>
{% if site.author %}
<author>
{% if site.author.name %}
<name>{{ site.author.name }}</name>
{% endif %}
{% if site.author.email %}
<email>{{ site.author.email }}</email>
{% endif %}
{% if site.author.website %}
<uri>{{ site.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.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.url }}/{{ image.name | strip_extension | slugify }}/</id>
<content type="html">
<![CDATA[<figure><a href="{{ site.url }}{{ image.name | strip_extension | slugify }}/"><img src="{{ site.url }}{{ image.name | uri_escape | processed_path: 'large' }}" alt="{{ image.name | strip_extension }}" /></a></figure>]]>
</content>
{% if site.author %}
<author>
{% if site.author.name %}
<name>{{ site.author.name }}</name>
{% endif %}
{% if site.author.email %}
<email>{{ site.author.email }}</email>
{% endif %}
{% if site.author.website %}
<uri>{{ site.author.website }}</uri>
{% endif %}
</author>
{% endif %}
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ site.url }}{{ image.name | uri_escape | processed_path: 'large' }}" />
<media:content medium="image" url="{{ site.url }}{{ image.name | uri_escape | processed_path: 'large' }}" xmlns:media="http://search.yahoo.com/mrss/" />
</entry>
{% endfor %}
</feed>