Skip to content
Snippets Groups Projects
Verified Commit eb5662af authored by David Beniamine's avatar David Beniamine
Browse files

Feed twig

parent d4ec8df2
Branches
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
{% set RFC822 = "D, d M Y H:i:s O" %}
<channel>
<title>{{ site_title | e }}</title>
<description>{{ pages.index.meta.description | e }}</description>
<link>{{ base_url }}/</link>
<atom:link href="{{ base_url ~ "/feed" }}" rel="self" type="application/rss+xml"/>
<pubDate>{{ "now" | date(RFC822) }}</pubDate>
<lastBuildDate>{{ "now" | date(RFC822) }}</lastBuildDate>
<generator>Pico</generator>
{% for page in pages if page.id not in ['index','feed'] and not end %}
<item>
<title>{{ page.title | e }}</title>
<description>{{ page.id | content | e }}</description>
<pubDate>{{ page.date | date(RFC822) }}</pubDate>
<link>{{ page.url }}</link>
<guid isPermaLink="true">{{ page.url }}</guid>
{% for cat in page.meta.categories %}
<category>{{ cat | e }}</category>
{% endfor %}
</item>
{% if loop.index == 10 %}{% set end = true %}{% endif %}
{% endfor %}
</channel>
</rss>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment