This commit is contained in:
Michael Zhang 2019-03-27 20:04:55 -05:00
parent 27bba9f93b
commit a3af588a0f
No known key found for this signature in database
GPG Key ID: 5BAEFE5D04F0CE6C
4 changed files with 27 additions and 4 deletions

View File

@ -9,4 +9,8 @@
{% block content %}
{{ blog::postlisting(posts=section.pages) }}
<p style="text-align: center;">
<small><a href="/rss.xml">click here for RSS feed</a></small>
</p>
{% endblock %}

View File

@ -22,8 +22,4 @@
{% endif %}
{% endfor %}
</table>
<p style="text-align: center;">
<small><a href="/rss.xml">click here for RSS feed</a></small>
</p>
{% endmacro postlisting %}

19
templates/rss.xml Normal file
View File

@ -0,0 +1,19 @@
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>{{ config.title }}</title>
<link>{{ config.base_url }}</link>
<description>{{ config.description }}</description>
<generator>zola</generator>
<language>{{ config.default_language }}</language>
<atom:link href="{{ feed_url }}" rel="self" type="application/rss+xml"/>
<lastBuildDate>{{ last_build_date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>
{% for page in pages %}
<item>
<title>{{ page.title }}</title>
<pubDate>{{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
<link>{{ page.permalink }}</link>
<description>{% if page.summary %}{{ page.summary }}{% else %}{{ page.content }}{% endif %}</description>
</item>
{% endfor %}
</channel>
</rss>

View File

@ -10,4 +10,8 @@
<h1 style="margin: 0;">articles under <code>{{ term.name }}</code></h1>
<p></p>
{{ blog::postlisting(posts=term.pages) }}
<p style="text-align: center;">
<small><a href="{{ term.permalink }}rss.xml">click here for RSS feed</a></small>
</p>
{% endblock %}