-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeed.xml
More file actions
52 lines (46 loc) · 1.91 KB
/
feed.xml
File metadata and controls
52 lines (46 loc) · 1.91 KB
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
---
layout: null
permalink: /swirling/feed.xml
---
<?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/"
>
<channel>
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}{{ site.baseurl }}/swirling/</link>
<atom:link href="{{ "/swirling/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml" />
{% for post in site.posts limit:10 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | replace: '"/swirling', '"https://www.grange85.co.uk/swirling' | xml_escape }}
{% unless post.content contains "<img" %}
{% if post.image contains ".jpg" %}
{% capture imagetag %}
<img src="{{ post.image }}">
{% endcapture %}
{{ imagetag | xml_escape }}
{% endif %}
{% endunless %}
</description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
{% if post.enclosure.url contains ".mp3" %}
<enclosure url="{{post.enclosure.url}}" length="{{post.enclosure.length}}" type="audio/mpeg" />
{% elsif post.image contains ".jpg" or post.image contains "googleusercontent" %}
<media:content url="{{post.image}}" type="image/jpg" medium="image" />
{% elsif post.image contains ".png" %}
<media:content url="{{post.image}}" type="image/png" medium="image" />
{% endif %}
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
{% for tag in post.tags -%}
<category>{{ tag | xml_escape }}</category>
{% endfor %}{% for cat in post.categories -%}
<category>{{ cat | xml_escape }}</category>
{% endfor %}
</item>
{% endfor %}
</channel>
</rss>