Skip to content

Commit 4d26620

Browse files
authored
Add author to RSS feed (#1442)
1 parent e6c9762 commit 4d26620

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

feed.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: null
33
---
44
<?xml version="1.0" encoding="UTF-8"?>
5-
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
5+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
66
<channel>
77
{% if site.title %}
88
<title>{{ site.title | xml_escape }}</title>
@@ -16,6 +16,11 @@ layout: null
1616
{% for post in site.posts limit:20 %}
1717
<item>
1818
<title>{{ post.title | strip_html | xml_escape }}</title>
19+
{% if post.author %}
20+
<dc:creator><![CDATA[ {{ post.author | xml_escape }} ]]></dc:creator>
21+
{% elsif site.author %}
22+
<dc:creator><![CDATA[ {{ site.author | xml_escape }} ]]></dc:creator>
23+
{% endif %}
1924
<description>
2025
{% if post.subtitle %}{{ post.subtitle | strip_html | xml_escape }} - {% endif %}
2126
{{ post.content | strip_html | xml_escape | truncatewords: excerpt_length }}

0 commit comments

Comments
 (0)