mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge d944175d05 into d83a261290
This commit is contained in:
commit
b49df99576
1 changed files with 8 additions and 1 deletions
|
|
@ -48,13 +48,20 @@ class Writer(object):
|
|||
|
||||
title = Markup(item.title).striptags()
|
||||
link = '%s/%s' % (self.site_url, item.url)
|
||||
description = item.get_content(self.site_url)
|
||||
try:
|
||||
if self.settings['FEED_USE_SUMMARY']:
|
||||
description = item.summary
|
||||
except:
|
||||
pass
|
||||
|
||||
feed.add_item(
|
||||
title=title,
|
||||
link=link,
|
||||
unique_id='tag:%s,%s:%s' % (urlparse(link).netloc,
|
||||
item.date.date(),
|
||||
urlparse(link).path.lstrip('/')),
|
||||
description=item.get_content(self.site_url),
|
||||
description=description,
|
||||
categories=item.tags if hasattr(item, 'tags') else None,
|
||||
author_name=getattr(item, 'author', ''),
|
||||
pubdate=set_date_tzinfo(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue