Repository navigation
Expand file tree
/
Copy pathfeed.xml
More file actions
32 lines (32 loc) · 1.5 KB
/
Copy pathfeed.xml
File metadata and controls
32 lines (32 loc) · 1.5 KB
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
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.name | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}{{ site.baseurl }}/</link>
<atom:link href="{{ site.url }}{{ site.baseurl }}/feed.xml" rel="self" type="application/rss+xml"/>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
{% for post in site.posts limit:20 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | strip_html | truncatewords: 100 | xml_escape }}</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
</item>
{% endfor %}
{% assign news = site.data.news | sort: 'date' | reverse %}
{% for article in news limit:20 %}
<item>
<title>{{ article.headline | markdownify | strip_html | strip | xml_escape }}</title>
<description>{{ article.headline | markdownify | strip | xml_escape }}</description>
{% if article.date.size == 10 %}<pubDate>{{ article.date | date_to_rfc822 }}</pubDate>{% endif %}
<link>{{ article.url | xml_escape }}</link>
<guid isPermaLink="false">{{ article.date | xml_escape }}:{{ article.url | xml_escape }}</guid>
</item>
{% endfor %}
</channel>
</rss>