-
Notifications
You must be signed in to change notification settings - Fork 1
/
rss.xml
53 lines (41 loc) · 2.13 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
layout: null
permalink: /rss/
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
{% assign title = site.title | default: site.name %}
<title type="html">{{ title | smartify | xml_escape }}</title>
{% if site.description %}
<subtitle>{{ site.description | xml_escape }}</subtitle>
{% endif %}
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ page.url | absolute_url | xml_escape }}</id>
<link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" />
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" />
{% for post in site.posts limit: 10 %}
{% assign author = site.data.authors | where: "id", post.author | first %}
{% capture author_uri %}/author/{{ author.name | slugify }}/{% endcapture %}
{% assign image_directory = "/content/images/" %}
{% assign image_directory_absolute = "/content/images/" | absolute_url %}
{% assign content = post.content | replace: image_directory, image_directory_absolute %}
<entry>
<title type="html">{{ post.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
<link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
<published>{{ post.date | date_to_xmlschema }}</published>
<updated>{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
<id>{{ post.id | absolute_url | xml_escape }}</id>
<content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}">{{ content | strip | xml_escape }}</content>
{% if author %}
<author>
<name>{{ author.name | xml_escape }}</name>
<uri>{{ author_uri | xml_escape | absolute_url }}</uri>
</author>
{% endif %}
{% if post.image %}
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ post.image | absolute_url | xml_escape }}" />
<media:content xmlns:media="http://search.yahoo.com/mrss/" url="{{ post.image | absolute_url | xml_escape }}" medium="image" />
{% endif %}
</entry>
{% endfor %}
</feed>