-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.rss.xml
32 lines (32 loc) · 1.56 KB
/
feed.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
---
layout: none
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{ site.title | xml_escape }}</title>
<description>{% if site.description %}{{ site.description | xml_escape }}{% endif %}</description>
<link>{{ site.url }}</link>
<atom:link href="{{ site.url }}/feed.xml" rel="self" type="application/rss+xml" />
{% assign publishedPosts = site.posts | where: 'show', 'true' %}
{% for post in publishedPosts limit:15 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<summary>{{ post.excerpt | xml_escape }}</summary>
<description>{{ post.excerpt | xml_escape }}</description>
<content:encoded>{{ post.content | xml_escape }}</content:encoded>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
{% assign post_image = post.image.path | default: post.image %}
{% if post_image %}
{% unless post_image contains "://" %}
{% assign post_image = post_image | absolute_url %}
{% endunless %}
<media:thumbnail url="{{ post_image | xml_escape }}" />
<media:content url="{{ post_image | xml_escape }}" type="image/jpeg"/>
{% endif %}
</item>
{% endfor %}
</channel>
</rss>