atom functionality is added and I fixed an issue in the RSS that is
caused by the deleted posts not having valid data.
This commit is contained in:
@@ -5,4 +5,18 @@
|
||||
<description><%= config.site_description %></description>
|
||||
<updated><%= new Date() %></updated>
|
||||
<id><%= config.site_url %></id>
|
||||
<% for (let postID = posts.length-1; postID >= 0; postID--) { %>
|
||||
<% if (posts[postID]["deleted"] != true) { %>
|
||||
<entry>
|
||||
<title><%= posts[postID]["title"] %></title>
|
||||
<link><%= config.site_url %>/post/<%= postID %></link>
|
||||
<summary><![CDATA[<%- converter.makeHtml(posts[postID]["content"]) %>]]></summary>
|
||||
<guid isPermaLink="true"><%= config.site_url %>/post/<%= postID %></guid>
|
||||
<pubDate><%# func.unix_time_to_atom_date(posts[postID]['pubdate']) %></pubDate>
|
||||
<% for (let tag_index = 0; tag_index < posts[postID]['tags'].length; tag_index++) { %>
|
||||
<category><![CDATA[<%= posts[postID]['tags'][tag_index] %>]]></category>
|
||||
<% } %>
|
||||
</entry>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</feed>
|
||||
|
Reference in New Issue
Block a user