Skip to content

Commit 27a6fb0

Browse files
MAGEDOC-3040: RSS enhancements (magento#3447)
* MAGEDOC-3040: Add last modified date so updated topics show in a feed reader; not just new topics * MAGEDOC-3040: Limit number of <items> and move filtering to assignment filters
1 parent a80e2de commit 27a6fb0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

feed.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ layout: null
1212
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
1313
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
1414
<generator>Jekyll v{{ jekyll.version }}</generator>
15-
{% for page in site.html_pages %}
16-
{% unless page.tag == 'omit' %}
15+
{% assign sorted_pages = site.html_pages | where_exp: "page", "page.tag != 'omit'"| sort:"last_modified_at" | reverse %}
16+
{% for page in sorted_pages limit: 100 %}
1717
<item>
1818
<title>{{ page.title | xml_escape }}</title>
1919
<description>{{ page.content | xml_escape | strip_html | truncatewords: 75 }}</description>
2020
<link>{{ page.url | prepend: site.url }}</link>
21+
<pubDate>{{ page.last_modified_at | date_to_rfc822 }}</pubDate>
2122
</item>
22-
{% endunless %}
2323
{% endfor %}
2424
</channel>
2525
</rss>

0 commit comments

Comments
 (0)