Files
growstuff/app/views/posts/show.rss.haml
Daniel O'Connor 49284eb169 Fix haml preview (#3610)
* HAML

* rewrite

* Fix specs - but likely still wrong

* Return temple

* Trailing line

* Fix specs

* This was rearranged, apparently.

* Fix tests

* Retain escaping

* Fix specs

* Rubocop

* Attempt to fix rendering

* Fix output

* Move away from filter

* Move away from filter

* Fix spec

* Fix specs

* Fix structure to avoid nested paragraph tags
2024-02-04 15:08:18 +10:30

23 lines
673 B
Plaintext

<?xml version="1.0" encoding="UTF-8"?>
%rss{ version: 2.0 }
%channel
%title Recent comments on #{@post.subject} (#{ENV['GROWSTUFF_SITE_NAME']})
%link= post_url(@post)
- @post.comments.each do |comment|
%item
%title Comment by #{comment.author.login_name} on #{comment.created_at}
%description
:escaped_markdown
<p>
Comment on
#{ link_to @post.subject, post_url(@post) }
</p>
:escaped_markdown
#{ strip_tags markdownify(comment.body) }
%pubdate= comment.created_at.to_fs(:rfc822)
%link= post_url(@post)
%guid= comment_url(comment)