motyl

Opinionated blog-aware static site generator written in Ruby
Log | Files | Refs | README | LICENSE

commit 32215befa525bf70de589f7e4e1e4ffe6c5e76cb
parent e9dce499b40e3a8ac8cafd2834bcfbc449d14bae
Author: Frederic Cambus <fred@statdns.com>
Date:   Sat,  5 Mar 2016 00:31:28 +0100

Atom feed now displays only the 20 latest entries

Diffstat:
Mmotyl.lua | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/motyl.lua b/motyl.lua @@ -72,6 +72,7 @@ local templates = { footer = readFile("templates/footer.mustache") } +data.site.feed = {} data.site.posts = {} data.site.categories = {} @@ -135,6 +136,10 @@ output = renderTemplate(templates.archives, data, templates) writeFile(data.site.destination .. "index.html", output) status("Rendering index.html") +for loop=1, 20 do + data.site.feed[loop] = data.site.posts[loop] +end + output = renderTemplate(templates.atom, data, templates) writeFile(data.site.destination .. "atom.xml", output) status("Rendering atom.xml")