Skip to content

Commit

Permalink
Fix: use correct XML base URL in feeds built from page attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
eigengrau committed Aug 9, 2018
1 parent 2f08932 commit b09d8f9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lektor_atom.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,15 @@ def build_artifact(self, artifact):
item_author_field = feed_source.item_author_field
item_author = get(item, item_author_field) or blog_author

base_url = url_to(
item.parent if item.is_attachment else item,
external=True
)

feed.add(
get_item_title(item, feed_source.item_title_field),
get_item_body(item, feed_source.item_body_field),
xml_base=url_to(item, external=True),
xml_base=base_url,
url=url_to(item, external=True),
content_type='html',
id=get_id(u'%s/%s' % (
Expand Down

0 comments on commit b09d8f9

Please sign in to comment.