-
Notifications
You must be signed in to change notification settings - Fork 4
/
feed.xml
33 lines (32 loc) · 1.49 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
---
layout: none
---
<?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 }}</link>
{% assign active_lang = site.active_lang %}
{% if active_lang == site.default_lang %}
{% assign active_lang = site.languages[0] %}
{% endif %}
{% assign filtered-posts = site.posts | where: "lang", active_lang %}
{% for post in filtered-posts limit:3 %}
<post>
<title>{{ post.title | xml_escape }}</title>
<summary>{{ post.excerpt | xml_escape }}</summary>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}/{{ post.url }}</guid>
<headerImage>{{ site.url }}/assets/images/{{ post.header-image }}</headerImage>
{% assign post_author = post.author | default: post.authors[0] | default: site.author %}
{% assign post_author = site.data.authors[post_author] | default: post_author %}
{% assign post_author_email = post_author.email | default: nil %}
{% assign post_author_uri = post_author.uri | default: nil %}
{% assign post_author_name = post_author.name | default: post_author %}
<author>{{ site.authors[post_author_name].display_name | default: "" | xml_escape }}</author>
</post>
{% endfor %}
</channel>
</rss>