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/atom.ejs
Normal file
23
views/syndication/atom.ejs
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="<%= config.charset %>" ?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title><%= config.site_name %></title>
|
||||
<link><%= config.site_url %></title>
|
||||
<description><%= config.site_description %></description>
|
||||
<updated><%= func.unix_time_to_date_format(getUnixTime(new Date()),"yyyy-MM-dd'T'HH:mm:ss'Z'") %></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[<%- (posts[postID]["content"]) %>]]></summary>
|
||||
<guid isPermaLink="true"><%= config.site_url %>/post/<%= postID %></guid>
|
||||
<pubDate><%- func.unix_time_to_date_format(posts[postID]['pubdate'],"yyyy-MM-dd'T'HH:mm:ss'Z'") %></pubDate>
|
||||
<% tags = posts[postID]['tags'].split(',') %>
|
||||
<% for (let tag_index = 0; tag_index < tags.length; tag_index++) { %>
|
||||
<category><![CDATA[<%= tags[tag_index] %>]]></category>
|
||||
<% } %>
|
||||
</entry>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</feed>
|
||||
Reference in New Issue
Block a user