Fri, 04 Dec 2009 01:26:48 +0000
build.lua: Write the latest 10 entries to the feed, not the earliest 10 entries :)
build.lua | file | annotate | diff | comparison | revisions |
--- a/build.lua Mon Jul 20 23:49:43 2009 +0100 +++ b/build.lua Fri Dec 04 01:26:48 2009 +0000 @@ -166,8 +166,8 @@ atom:write("\t<updated>", os.date "!%Y-%m-%dT%H:%M:%SZ", "</updated>\n"); -for n, post in ipairs(posts) do - if n > 10 then break; end +for n = #posts,#posts-10,-1 do + local post = posts[n]; if post.published then atom:write("<entry>\n"); atom:write("\t<author>\n\t\t<name>", post.author or default_author or "Unknown Author", "</name>\n\t</author>\n");