From d9af6b83e02fa76c2784409fcbc0346074f3c1ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Reu=C3=9Fe?= Date: Wed, 8 Aug 2018 17:23:26 +0200 Subject: [PATCH] Fix: use correct XML base URL in feeds built from page attachments --- lektor_atom.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lektor_atom.py b/lektor_atom.py index 1400515..20f8eec 100644 --- a/lektor_atom.py +++ b/lektor_atom.py @@ -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' % (