Add unique_id to RSS/ATOM feeds.

Reason:

    Without <guid> tag in RSS XML, some RSS reader will show all
    items in RSS as unread item.
This commit is contained in:
Brian Hsu 2011-11-29 09:53:48 +08:00
commit b2919e9051

View file

@ -34,6 +34,7 @@ class Writer(object):
feed.add_item(
title=item.title,
link='%s/%s' % (self.site_url, item.url),
unique_id='%s/%s' % (self.site_url, item.url),
description=item.content,
categories=item.tags if hasattr(item, 'tags') else None,
author_name=getattr(item, 'author', 'John Doe'),