Database reading changes should work, gotta implement same for writing and finish up testing then merge back into master

This commit is contained in:
deadvey
2026-03-07 17:56:53 +00:00
parent 30cec0f7f0
commit ad4efffed5
12 changed files with 74 additions and 147 deletions

View 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>