Database reading changes should work, gotta implement same for writing and finish up testing then merge back into master
This commit is contained in:
23
views/syndication/rss.ejs
Normal file
23
views/syndication/rss.ejs
Normal file
@@ -0,0 +1,23 @@
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title><%= config.site_name %></title>
|
||||
<link><%= config.site_url %></link>
|
||||
<description><%= config.site_description %></description>
|
||||
<% for (let postID = posts.length-1; postID >= 0; postID--) { %>
|
||||
<% if (posts[postID]["deleted"] != true) { %>
|
||||
<item>
|
||||
<title><%= posts[postID]["title"] %></title>
|
||||
<link><%= config.site_url %>/post/<%= postID %></link>
|
||||
<description><![CDATA[<%- (posts[postID]["content"]) %>]]></description>
|
||||
<guid isPermaLink="true"><%= config.site_url %>/post/<%= postID %></guid>
|
||||
<pubDate><%= func.unix_time_to_date_format(posts[postID]['pubdate'],'EEE, dd MMM yyyy HH:mm:ss') %></pubDate>
|
||||
<author><%= users[posts[postID]['userID']]['prettyname'] %></author>
|
||||
<% tags = posts[postID]['tags'].split(',') %>
|
||||
<% for (let tag_index = 0; tag_index < tags.length; tag_index++) { %>
|
||||
<category><![CDATA[<%= tags[tag_index] %>]]></category>
|
||||
<% } %>
|
||||
</item>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</channel>
|
||||
</rss>
|
||||
Reference in New Issue
Block a user