-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrss.xml
38 lines (38 loc) · 2.01 KB
/
rss.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
---
layout: none
nositemap: "yes"
---
<?xml version="1.0"?>
<rss version="2.0" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>{{ site.title | smartify | xml_escape }}</title>
<link>{{ '/' | absolute_url }}</link>
<description>{{ site.description | xml_escape }}</description>
<language>fr-FR</language>
<sy:updatePeriod>daily</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>{{ site.time }}</sy:updateBase>
<image>
<url>{% link favicon.ico %}</url>
<title>{{ site.title | smartify | xml_escape }}</title>
<link>{{ '/' | absolute_url }}</link>
<width>32</width>
<height>32</height>
</image>
{% assign posts = site.posts | where_exp: "post", "post.draft != true" | sort: "date" | reverse %}
{% for post in posts limit: 10 %}
<item>
<title>{{ post.title | smartify | strip_html | strip_newlines | normalize_whitespace | xml_escape }}{% if post.category %} - {{ post.category | xml_escape }}{% endif %}{% if post.note %} - {{ post.note }}/5{% endif %}</title>
<description>{{ post.content | newline_to_br | strip_newlines | replace: '<br />', ' ' | strip_html | truncatewords: 50 | normalize_whitespace | xml_escape }}</description>
{% assign post_image = post.image %}{% if post_image %}
<media:thumbnail width="200" height="320" url="{{ post_image | absolute_url }}"/>
<media:content url="{{ post_image | absolute_url }}" medium="image" />
{% endif %}
<link>{{ post.id | absolute_url | xml_escape }}/</link>
<pubDate>{{ post.date | date_to_xmlschema }}</pubDate>
<guid isPermaLink="true">{{ post.id | absolute_url | xml_escape }}/</guid>
{% for tag in post.tags %}<category><![CDATA[{{ tag | xml_escape }}]]></category>{% endfor %}
</item>
{% endfor %}
</channel>
</rss>