|
@@ -1,3 +1,4 @@
|
|
|
|
+import six
|
|
from pelican import signals
|
|
from pelican import signals
|
|
from pelican.contents import Article, Draft, Page
|
|
from pelican.contents import Article, Draft, Page
|
|
from pelican.generators import ArticlesGenerator
|
|
from pelican.generators import ArticlesGenerator
|
|
@@ -20,7 +21,7 @@ def images_extraction(instance):
|
|
i.extract()
|
|
i.extract()
|
|
if len(images) > 0:
|
|
if len(images) > 0:
|
|
# set _summary field which is based on metadata. summary field is only based on article's content and not settable
|
|
# set _summary field which is based on metadata. summary field is only based on article's content and not settable
|
|
- instance._summary = unicode(soup)
|
|
|
|
|
|
+ instance._summary = six.text_type(soup)
|
|
|
|
|
|
# If there are no image in summary, look for it in the content body
|
|
# If there are no image in summary, look for it in the content body
|
|
if not representativeImage:
|
|
if not representativeImage:
|