24 lines
936 B
Elixir
24 lines
936 B
Elixir
<?xml version="1.0" encoding="UTF-8"?>
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
<channel>
|
|
<title><%= LayoutView.title(@view_module, @view_template, assigns) %></title>
|
|
<description><%= LayoutView.excerpt(@view_module, @view_template, assigns) %></description>
|
|
<link>https://pre.hn</link>
|
|
<atom:link href="https://pre.hn<%= @feed_url %>" rel="self" type="application/rss+xml" />
|
|
|
|
<%= for post <- @posts do %>
|
|
<item>
|
|
<title><%= post.post_title |> HtmlSanitizeEx.strip_tags() %></title>
|
|
<description>
|
|
<%= post.post_content |> process_content |> html_escape |> safe_to_string %>
|
|
</description>
|
|
<pubDate><%=
|
|
post.post_date
|
|
|> DateTime.from_naive!("Etc/UTC")
|
|
|> Timex.format!("{WDshort}, {D} {Mshort} {YYYY} {h24}:{m}:{s} {Z}")
|
|
%></pubDate>
|
|
<guid isPermaLink="true"><%= post.guid %></guid>
|
|
</item>
|
|
<% end %>
|
|
</channel>
|
|
</rss>
|