-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeed.xml
40 lines (40 loc) · 3.23 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
---
layout: none
nositemap: "yes"
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" {% if site.lang %}xml:lang="{{ site.lang }}"{% endif %}>
<link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" />
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ page.url | absolute_url | xml_escape }}/</id>
{% if site.title %}<title type="html">{{ site.title | smartify | xml_escape }}</title>{% endif %}
{% if site.description %}<subtitle>{{ site.description | xml_escape }}</subtitle>{% endif %}
{% if site.author %}<author><name>{{ site.author.name | default: site.author | xml_escape }}</name></author>{% endif %}
{% for tag in site.tags %}<category term="{{ tag[0] | xml_escape}}"/>{% endfor %}
{% assign posts = site.posts | where_exp: "post", "post.draft != true" | sort: "date" | reverse %}
{% for post in posts limit: 10 %}
<entry{% if post.lang %}{{" "}}xml:lang="{{ post.lang }}"{% endif %}>
<title type="html">{{ post.title | smartify | strip_html | strip_newlines | normalize_whitespace | xml_escape }}{% if post.category %} - {{ post.category | xml_escape }}{% endif %}{% if post.note %} - {% assign note = post.note %}{% include stars.html %}{% endif %}</title>
<link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | smartify | strip_html | strip_newlines | normalize_whitespace | xml_escape }}{% if post.category %} - {{ post.category | xml_escape }}{% endif %}" />
<published>{{ post.date | date_to_xmlschema }}</published>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>{{ post.url | absolute_url }}</id>
<content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}">{{ post.content | strip | xml_escape }}
<br>
Cet article est paru en premier sur <a href="{{ post.url | prepend: site.url }}" >{{ site.title }}</a>
</content>
{% 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_name = post_author.name | default: post_author %}
<author><name>{{ post_author_name | default: "" | xml_escape }}</name></author>
{% if post.category %}<category term="{{ post.category | xml_escape }}" />{% endif %}
{% for tag in post.tags %}<category term="{{ tag | xml_escape }}" />{% endfor %}
{% if post.excerpt and post.excerpt != empty %}<summary>{{ post.content | strip_html | strip_newlines | truncatewords: 50 | normalize_whitespace | xml_escape }}</summary>{% endif %}
{% assign post_image = post.image %}{% if post_image %}
<media:thumbnail url="{{ post_image | absolute_url }}" height="320" width="200"/>
<media:content url="{{ post_image | absolute_url }}" medium="image" />
{% endif %}
</entry>
{% endfor %}
</feed>