-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
feed.xml
69 lines (69 loc) · 3.9 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
---
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ site.lang }}">
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
<link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" />
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" hreflang="{{ site.lang }}" />
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ page.url | absolute_url | xml_escape }}</id>
<title type="html">{{ site.title | smartify | xml_escape }}</title>
<subtitle>{{ site.description | xml_escape }}</subtitle>
<icon>{{ site.url }}/assets-local/favicon.png</icon>
<logo>{{ site.url }}/assets-local/logo-2x1.png</logo>
<rights>{{ site.data.lang.licence.id }}</rights>
<author>
<name>{{ site.author | xml_escape }}</name>
<email>{{ site.email | xml_escape }}</email>
</author>
{%- assign objects = site.explainers | concat: site.infographics | concat: site.studies | concat: site.datasets | where_exp: "item", "item.published != false" | sort: "published" | reverse -%}
{% for object in objects %}
<entry xml:lang="{{ site.lang }}">
{%- assign post_title = object.title | smartify | strip_html | normalize_whitespace | xml_escape -%}
<title type="html">{{ post_title }}</title>
<link href="{{ object.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post_title }}" />
<published>{{ object.published | date_to_xmlschema }}</published>
<id>{{ object.id | absolute_url | xml_escape }}</id>
<author>
<name>{{ object.author | default: site.author | xml_escape }}</name>
</author>
{% for tag in object.tags -%}
<category term="{{ tag | xml_escape }}" />
{% endfor %}
{%- case object.layout -%}
{% when 'infographic' %}
{% assign image = "/assets/generated/" | append: object.slug | append: "_600.png" %}
{% when 'study' %}
{% assign image = "/assets/studies/" | append: object.slug | append: ".jpg" %}
{% when 'explainer' %}
{% assign image = "/assets/covers/" | append: object.slug | append: "_600.jpg" %}
{% else %}
{% assign image = "/assets-local/img/preview.png" %}
{%- endcase -%}
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ image | absolute_url | xml_escape }}" />
<media:content medium="image" url="{{ image | absolute_url | xml_escape }}" xmlns:media="http://search.yahoo.com/mrss/" />
<content type="html" xml:base="{{ object.url | absolute_url | xml_escape }}">
{%- case object.layout -%}
{% when 'explainer' %}
{%- capture img-tag %}<img src="{{ site.url | append: '/assets/covers/' | append: object.slug | append: '_600.jpg' | xml_escape }}" alt="{{ object.title | xml_escape }}" />{%- endcapture -%}
{{ img-tag | xml_escape }}
{{ object.perex | markdownify | xml_escape }}
{% when 'infographic' %}
{%- capture img-tag %}<img src="{{ site.url | append: '/assets/generated/' | append: object.slug | append: '_600.png' | xml_escape }}" alt="{{ object.title | xml_escape }}" />{%- endcapture -%}
{{ img-tag | xml_escape }}
{{ object.caption | markdownify | xml_escape }}
{% when 'study' %}
{{ object.intro | markdownify | xml_escape }}
{{ site.data.lang.text.study.summary | prepend: "## " | markdownify | xml_escape }}
{{ object.summary | markdownify | xml_escape }}
{% when 'survey' %}
{{ object.intro | markdownify | xml_escape }}
{% when 'dataset' %}
{{ object.intro | markdownify | xml_escape }}
{%- endcase -%}
{%- capture more-online %}_{{ site.data.lang.text.rss.more-online }}_{% endcapture -%}
{{ more-online | markdownify | strip | xml_escape }}
</content>
</entry>
{%- endfor -%}
</feed>