add rss in light theme

This commit is contained in:
Adrien Beudin 2016-11-04 14:43:09 +01:00
parent 7c8d17fbcb
commit d29a75fbba
2 changed files with 25 additions and 20 deletions

View File

@ -1,23 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ settings.title }}</title>
<description>{{ settings.sub_title }}</description>
<link>{{ settings.url }}</link>
<atom:link href="{{ settings.url }}/feed.xml" rel="self" type="application/rss+xml" />
{% for gallery in galleries %}
{% set absolute_url = settings.url + "/" + gallery.link %}
<item>
<title>{{ gallery.title }}</title>
<link>{{ absolute_url }}</link>
<guid>{{ gallery.link }}</guid>
{% if gallery.sub_title %}
<description>{{ gallery.sub_title }}</description>
{% endif %}
<pubDate>{{ gallery.date }}</pubDate>
</item>
{% endfor %}
</channel>
<channel>
<title>{{ settings.title }}</title>
<description>{{ settings.sub_title }}</description>
<link>{{ settings.url }}</link>
<atom:link href="{{ settings.url }}/feed.xml" rel="self" type="application/rss+xml" />
{% for gallery in galleries %}
{% set absolute_url = settings.url + "/" %}
{% include "item.html" %}
{% endfor %}
</channel>
</rss>

View File

@ -0,0 +1,15 @@
{% set absolute_url = absolute_url+ gallery.link+"/" %}
<item>
<title>{{ gallery.title }}</title>
<link>{{ absolute_url }}</link>
<guid>{{ gallery.link }}</guid>
{% if gallery.sub_title %}
<description>{{ gallery.sub_title }}</description>
{% endif -%}
<pubDate>{{ gallery.date }}</pubDate>
</item>
{% for sub_gallery in gallery.sub_gallery %}
{% with gallery=sub_gallery %}
{% include "item.html" %}
{% endwith %}
{% endfor %}