Skip to content

Commit f886496

Browse files
committed
Fix rss feed
1 parent 942259a commit f886496

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.formatOnSave": false
3+
}

rss/feed.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ layout: none
99
<link>{{ site.url }}{{ site.baseurl }}/</link>
1010
<atom:link href="{{ "/rss/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml" />
1111
{% for reg in site.collections %}
12-
{% assign name = reg.label %}
13-
{% for value in reg.posts %}
14-
<item>
15-
<title>{{ value.slug | xml_escape }}</title>
16-
<description>{{ value.description | xml_escape }}</description>
17-
<category>{{ reg.label }}</category>
18-
<pubDate>{% if value.date %}{{ value.date | date: "%a, %d %b %Y %H:%M:%S %z" }}{% else %}{{ 'now' | date: "%a, %d %b %Y %H:%M:%S %z" }}{% endif %}</pubDate>
19-
<link>{{ value.url }}</link>
20-
<guid isPermaLink="true">{{ value.url }}</guid>
21-
</item>
22-
{% endfor %}
12+
{% if reg.output %}
13+
{% assign name = reg.label %}
14+
{% for value in reg.docs %}
15+
<item>
16+
<title>{{ value.slug | xml_escape }}</title>
17+
<description>{{ value.description | xml_escape }}</description>
18+
<category>{{ reg.label }}</category>
19+
<link>{{ value.url }}</link>
20+
<guid isPermaLink="true">{{ value.url }}</guid>
21+
<pubDate>{% if value.date %}{{ value.date | date: "%a, %d %b %Y %H:%M:%S %z" }}{% else %}{{ 'now' | date: "%a, %d %b %Y %H:%M:%S %z" }}{% endif %}</pubDate>
22+
</item>
23+
{% endfor %}
24+
{% endif %}
2325
{% endfor %}
2426
</channel>
2527
</rss>

0 commit comments

Comments
 (0)