-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.xml
49 lines (48 loc) · 2.13 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
---
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
{% assign add_protocol = false %}
{% assign protocol = site.url | split: '/' | first %}
{% if site.url != '' and protocol != 'http:' and protocol != 'https:' %}
{% assign site_url = site.url | prepend: 'http:' %}
{% assign add_protocol = true %}
{% else %}
{% assign site_url = site.url %}
{% endif %}
<title type="text">{{ site.title }}</title>
<generator uri="https://github.com/mojombo/jekyll">Jekyll</generator>
<link rel="self" type="application/atom+xml" href="{{ site_url }}/feed.xml" />
<link rel="alternate" type="text/html" href="{{ site_url }}/" />
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site_url }}/</id>
<author>
<name>{{ site.owner.name }}</name>
<uri>{{ site_url }}/</uri>
<email>{{ site.owner.email }}</email>
</author>
{% for post in site.posts limit:20 %}
<entry>
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
<link rel="alternate" type="text/html" href="{% if post.link %}{{ post.link }}{% else %}{{ site_url }}{{ post.url }}{% endif %}"/>
<id>{{ site_url }}{{ post.id }}</id>
{% if post.modified %}<published>{{ post.date | date_to_xmlschema }}</published>
<updated>{{ post.modified }}T00:00:00-00:00</updated>
{% else %}<published>{{ post.date | date_to_xmlschema }}</published>
<updated>{{ post.date | date_to_xmlschema }}</updated>{% endif %}
<author>
<name>{{ site.owner.name }}</name>
<uri>{{ site_url }}</uri>
<email>{{ site.owner.email }}</email>
</author>
{% for tag in post.tags %}<category scheme="{{ site_url }}/tags/#{{ tag | uri_escape }}" term="{{ tag }}" />{% endfor %}
<content type="html">
{% if add_protocol %}
{{ post.content | xml_escape | replace: site.url, site_url }}
{% else %}
{{ post.content | xml_escape }}
{% endif %}
<p><a href="{{ site_url }}{{ post.url }}">{{ post.title }}</a> was originally published by {{ site.owner.name }} at <a href="{{ site_url }}">{{ site.title }}</a> on {{ post.date | date: "%B %d, %Y" }}.</p></content>
</entry>
{% endfor %}
</feed>