-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrss.xml
83 lines (70 loc) · 3.83 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
layout: none
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" {% if site.lang %}xml:lang="{{ site.lang }}"{% endif %}>
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
<link href="{{ site.url }}{{ page.url }}" rel="self" type="application/atom+xml" />
<link href="{{ site.url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.url | xml_escape }}</id>
{% if site.title %}
<title type="html">{{ site.title | smartify | xml_escape }}</title>
{% elsif site.name %}
<title type="html">{{ site.name | smartify | xml_escape }}</title>
{% endif %}
{% if site.description %}
<subtitle>{{ site.description | xml_escape }}</subtitle>
{% endif %}
{% if site.author %}
<author>
<name>{{ site.author.name | default: site.author | xml_escape }}</name>
{% if site.author.email %}
<email>{{ site.author.email | xml_escape }}</email>
{% endif %}
{% if site.author.uri %}
<uri>{{ site.author.uri | xml_escape }}</uri>
{% endif %}
</author>
{% endif %}
{% assign posts = site.posts | where_exp: "post", "post.draft != true" %}
{% for post in posts %}
{% assign post_author = post.author | default: post.authors[0] | default: site.author %}
{% assign post_author = site.data.authors[post_author] | default: post_author %}
{% assign post_author_email = post_author.email | default: nil %}
{% assign post_author_uri = post_author.uri | default: nil %}
{% assign post_author_name = post_author.name | default: post_author %}
<entry{% if post.lang %}{{" "}}xml:lang="{{ post.lang }}"{% endif %}>
<title type="html">{{ post.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
<link href="{{ site.url }}{{ post.url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
<published>{{ post.date | date_to_xmlschema }}</published>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>{{ site.url | xml_escape }}{{ post.url | xml_escape}}</id>
<content type="html" xml:base="{{ site.url | xml_escape }}{{ post.url | xml_escape}}">{{ post.content | strip | xml_escape }}</content>
<author>
<name>Calvin A. Allen</name>
</author>
{% for category in post.categories %}
<category term="{{ category | xml_escape }}" />
{% endfor %}
{% for tag in post.tags %}
<category term="{{ tag | xml_escape }}" />
{% endfor %}
{% if post.description and post.description != empty %}
<summary type="html">{{ post.description | strip_html | normalize_whitespace | xml_escape }}</summary>
{% elsif post.excerpt and post.excerpt != empty %}
<summary type="html">{{ post.excerpt | strip_html | normalize_whitespace | xml_escape }}</summary>
{% endif %}
{% assign post_path = site.source | append: '/' | append: post.path %}
{% capture cover_image_exists %}{% cover_exists {{ post_path }},{{ post.image }} %}{% endcapture %}
{% capture alt_cover_image_exists %}{% cover_exists {{ post_path }},{{ post.image_alt }} %}{% endcapture %}
{% if post.image and cover_image_exists == "true" %}
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ site.url }}{{ post.url }}{{ post.image }}" />
{% elsif post.image_alt and alt_cover_image_exists == "true" %}
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ site.url }}{{ post.url }}{{ post.image_alt }}" />
{% else %}
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ site.url }}/images/social/headshot-cover.png" />
{% endif %}
</entry>
{% endfor %}
</feed>