diff --git a/sigal/plugins/feeds.py b/sigal/plugins/feeds.py
index 22a03a8..39d9226 100644
--- a/sigal/plugins/feeds.py
+++ b/sigal/plugins/feeds.py
@@ -51,17 +51,24 @@ def generate_feed(gallery, medias, feed_type=None, feed_url='', nb_items=0):
description=Markup.escape(root_album.description).striptags()
)
+ theme = gallery.settings['theme']
nb_medias = len(medias)
nb_items = min(nb_items, nb_medias) if nb_items > 0 else nb_medias
for item in medias[:nb_items]:
+ if theme == 'galleria':
+ link = '%s/%s/#%s' % (feed_url, item.path, item.url)
+ else:
+ link = '%s/%s/' % (feed_url, item.path)
+
feed.add_item(
title=Markup.escape(item.title or item.url),
- link='%s/#%s' % (item.path, item.url),
+ link=link,
# unique_id='tag:%s,%s:%s' % (urlparse(link).netloc,
# item.date.date(),
# urlparse(link).path.lstrip('/')),
- description='
' % (item.path, item.thumbnail),
+ description='
' % (feed_url, item.path,
+ item.thumbnail),
# categories=item.tags if hasattr(item, 'tags') else None,
author_name=getattr(item, 'author', ''),
pubdate=item.date or datetime.now(),
diff --git a/tests/sample/sigal.conf.py b/tests/sample/sigal.conf.py
index b6839b2..cbf4ac1 100644
--- a/tests/sample/sigal.conf.py
+++ b/tests/sample/sigal.conf.py
@@ -22,8 +22,8 @@ watermark_opacity = 0.3
theme = 'colorbox'
thumb_size = (200, 150)
-rss_feed = {'feed_url': 'http://example.org/feed.rss', 'nb_items': 10}
-atom_feed = {'feed_url': 'http://example.org/feed.atom', 'nb_items': 10}
+rss_feed = {'feed_url': 'http://127.0.0.1:8000/feed.rss', 'nb_items': 10}
+atom_feed = {'feed_url': 'http://127.0.0.1:8000/feed.atom', 'nb_items': 10}
# theme = 'photoswipe'
# theme = 'galleria'