-
Notifications
You must be signed in to change notification settings - Fork 5
/
feed.xml
55 lines (50 loc) · 1.96 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
---
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>De vita sua – John Muccigrosso's Blog</title>
<link href="{{ site.url }}/feed.xml" rel="self"/>
<link href="{{ site.url }}/blog"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
{%- if site.feed.icon %}
<icon>{{ site.feed.icon }}</icon>
{% endif -%}
{%- if site.feed.logo %}
<logo>{{ site.feed.logo }}</logo>
{% endif -%}
<id>{{ site.url }}/blog</id>
<rights>Licensed under CC BY-NC-SA 4.0</rights>
<author>
<name>John Muccigrosso</name>
<email>[email protected]</email>
</author>
{%- for post in site.posts %}
{%- comment %}If the post date is the same as the build date, then use the build date
as it includes the time. Otherwise just use the post date. {% endcomment -%}
{% assign p = post.date | date_to_string %}
{% assign s = site.time | date_to_string %}
{%- if s == p %}
{% assign d = site.time %}
{% else %}
{% assign d = post.date %}
{% endif -%}
<entry>
<title>{{ post.title }}</title>
<link href="{{ site.url }}{{ post.url }}"/>
<updated>{{ d | date_to_xmlschema }}</updated>
<id>{{ site.url }}/{{ post.id }}</id>
{% for c in post.tags %}<category term="{{ c }}"/>
{% endfor -%}
<summary type="html">{{ post.excerpt | strip_html | xml_escape | strip }}</summary>
<content type="html">{{ post.content | xml_escape }}</content>
{% assign post_image = post.image.path | default: post.image %}
{% if post_image %}
{% unless post_image contains "://" %}
{% assign post_image = post_image | absolute_url %}
{% endunless %}
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ post_image | xml_escape }}" />
<media:content medium="image" url="{{ post_image | xml_escape }}" xmlns:media="http://search.yahoo.com/mrss/" />
{% endif %}
</entry>
{% endfor -%}
</feed>