-
Notifications
You must be signed in to change notification settings - Fork 17
/
feed.xml
48 lines (44 loc) · 2.28 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
---
layout: null
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" />
<link href="{{ '/blog/' | absolute_url }}" rel="alternate" type="text/html" hreflang="en" />
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ '/' | absolute_url | xml_escape }}</id>
<title type="html">{{ site.title | smartify | xml_escape }}</title>
<subtitle>{{ site.description | xml_escape }}</subtitle>
<author>
<name>{{ site.author.name | default: site.author | xml_escape }}</name>
<email>{{ site.author.email | xml_escape }}</email>
</author>
{%- assign posts = site.posts | where_exp: "post", "post.draft != true" -%}
{%- for post in posts limit: 10 -%}
<entry xml:lang="en">
<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 }}">{{ post.content | strip_html | strip | xml_escape }}</content>
{%- assign post_author = post.author | default: site.author -%}
<author>
<name>{{ post_author.name | default: post_author | default: "" | xml_escape }}</name>
{%- if post_author.email -%}
<email>{{ post_author.email | xml_escape }}</email>
{%- endif -%}
</author>
{%- if post.summary or post.excerpt -%}
<summary type="html">{{ post.summary | default: post.excerpt | strip_html | normalize_whitespace | xml_escape }}</summary>
{%- endif -%}
{%- assign post_image = post.image -%}
{%- if post_image -%}
{%- unless post_image contains "://" -%}
{%- assign post_image = post_image | absolute_url -%}
{%- endunless -%}
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ post_image | xml_escape }}" />
{%- endif -%}
</entry>
{%- endfor -%}
</feed>