-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfeed.xml
30 lines (29 loc) · 1.28 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
---
layout: null
---
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>{{ site.title }}</title>
<description>{{ site.description }}</description>
<link>{{ site.url }}{{ site.baseurl }}</link>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
{%- assign default_paths = site.pages | map: "path" -%}
{%- assign page_paths = site.header_pages | default: default_paths -%}
{%- if page_paths -%}
{%- assign sorted_pages = site.pages | where_exp: "item", "page_paths contains item.path" | sort: "date" | reverse -%}
{%- for page in sorted_pages -%}
{%- if page.title and page.url != "/" -%}
<item>
<title>{{ page.title }}</title>
<description>{{ page.description }}</description>
<link>{{ site.url }}{{ site.baseurl }}{{ page.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ site.baseurl }}{{ page.url }}</guid>
<pubDate>{{ page.date | date_to_rfc822 }}</pubDate>
</item>
{%- endif -%}
{%- endfor -%}
{%- endif -%}
</channel>
</rss>