use summary if it's available and content isn't
This commit is contained in:
parent
10069b0eb1
commit
2616816a24
2 changed files with 7 additions and 1 deletions
|
@ -18,7 +18,7 @@ itsdangerous==0.24
|
||||||
Jinja2==2.8
|
Jinja2==2.8
|
||||||
MarkupSafe==0.23
|
MarkupSafe==0.23
|
||||||
mf2py==1.0.4
|
mf2py==1.0.4
|
||||||
mf2util==0.3.3
|
-e git+https://github.com/kylewm/mf2util.git@master#egg=mf2util-master
|
||||||
psycopg2==2.6.1
|
psycopg2==2.6.1
|
||||||
pyasn1==0.1.9
|
pyasn1==0.1.9
|
||||||
pycparser==2.14
|
pycparser==2.14
|
||||||
|
|
|
@ -474,6 +474,12 @@ def hentry_to_entry(hentry, feed, backfill, now):
|
||||||
|
|
||||||
title = hentry.get('name')
|
title = hentry.get('name')
|
||||||
content = hentry.get('content')
|
content = hentry.get('content')
|
||||||
|
summary = hentry.get('summary')
|
||||||
|
|
||||||
|
if not content and summary:
|
||||||
|
content = '{}<br/><br/><a href="{}">Read more</a>'.format(
|
||||||
|
summary, permalink)
|
||||||
|
|
||||||
if not content and hentry.get('type') == 'entry':
|
if not content and hentry.get('type') == 'entry':
|
||||||
content = title
|
content = title
|
||||||
title = None
|
title = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue