diff --git a/djpress/feeds.py b/djpress/feeds.py index 42eefb4..fa85ee3 100644 --- a/djpress/feeds.py +++ b/djpress/feeds.py @@ -28,7 +28,10 @@ def item_title(self: "ContentFeed", item: Content) -> str: def item_description(self: "ContentFeed", item: Content) -> str: """Return the description of the post.""" - return item.truncated_content_markdown + description = item.truncated_content_markdown + if item.is_truncated: + description += f'
' + return description def item_link(self: "ContentFeed", item: Content) -> str: """Return the link to the post.""" diff --git a/djpress/templates/djpress/snippets/post_summary.html b/djpress/templates/djpress/snippets/post_summary.html index 96199f5..ed34fb3 100644 --- a/djpress/templates/djpress/snippets/post_summary.html +++ b/djpress/templates/djpress/snippets/post_summary.html @@ -2,7 +2,7 @@{{ post.truncated_content_markdown|safe }}
- {% if '' in post.content %} + {% if post.is_truncated %} {% endif %}diff --git a/djpress/test_feeds.py b/djpress/test_feeds.py index 9cb3845..93cc404 100644 --- a/djpress/test_feeds.py +++ b/djpress/test_feeds.py @@ -22,7 +22,6 @@ def test_latest_posts_feed(client): assert response["Content-Type"] == "application/rss+xml; charset=utf-8" feed = response.content.decode("utf-8") - print(feed) assert "