-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeed.xml
23 lines (23 loc) · 1.24 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
---
layout: null
permalink: /feed/index.xml
---
<?xml version="1.0" encoding="UTF-8"?>{% capture src_url %}src="{{ site.url }}/{% endcapture %}{% capture href_url %}href="{{ site.url }}/{% endcapture %}
<rss version="2.0" xmlns:atom="https://www.w3.org/2005/Atom">
<?xml-stylesheet type="text/css" href="{{ site.url }}/css/rss.css" ?>
<channel>
<title>{{ site.name | xml_escape }}</title>
<description>{% if site.description %}{{ site.description | xml_escape }}{% endif %}</description>
<link>{{ site.url }}</link>
<atom:link href="{{ site.url }}/feed/" rel="self" type="application/rss+xml" />
{% for post in site.posts limit: 20 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | replace: '"//', 'BANANABANANA' | replace: 'src="/', src_url | replace: 'href="/', href_url | replace: 'BANANABANANA', '"//' | replace: 'class="alignright"', 'class="alignright" align="right"' | replace: 'class="alignleft"', 'class="alignleft" align="left"'| xml_escape}}</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
</item>
{% endfor %}
</channel>
</rss>