ferron

Ferron is a fast and simple static website generator made with Lua.
Log | Files | Refs | Submodules | README | LICENSE

commit 898d0bb800ea946c923ae1cc2d33cd446b8a09ef
parent 6ad41c5b8e56aef7f3d8f6e0dd85d940f22a9c1b
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sat,  2 May 2020 14:35:47 -0400

Remove a comment

Diffstat:
Mferron/page.lua | 32+++-----------------------------
1 file changed, 3 insertions(+), 29 deletions(-)

diff --git a/ferron/page.lua b/ferron/page.lua @@ -150,37 +150,11 @@ function page.render(page, sitedata) end function page.makepages(sitedata) - local singlepages = tb.filter(fl.isNotIndex, sitedata.nodes) - local indexpages = tb.filter(fl.isIndex, sitedata.nodes) + local singlepages = tb.filter(fl.isNotIndex, tb.from(fl.getdirtree(fl.isDirectory(sitedata.content)))) + local indexpages = tb.filter(fl.isIndex, tb.from(fl.getdirtree(fl.isDirectory(sitedata.content)))) -- Render single pages - tb.each( - function(p) - -- local lastbuild = lfs.currentdir() .. '/lastbuild' - - -- -- If there's a lastbuild file - -- -- Check for modifications - -- if fl.isFile(lastbuild) then - -- local lastbuildmod = lfs.attributes(lfs.currentdir() .. '/lastbuild').modification - -- local pagemod = lfs.attributes(p).modification - -- local pageconfmod = (lfs.attributes(fl.removeextension(p) .. '.json') - -- or lfs.attributes(fl.removeextension(p) .. '.lua')).modification - -- local templatemod = lfs.attributes(tp.gettemplatepath(p, sitedata)).modification - -- -- Add a configmod too - - -- -- Render if a page or a page conf or a template is modified - -- if pagemod > lastbuildmod - -- or pageconfmod > lastbuildmod - -- or templatemod > lastbuildmod - -- then - -- page.render(p, sitedata) - -- end - -- else - -- page.render(p, sitedata) - -- end - page.render(p, sitedata) - end, singlepages - ) + tb.each(function(p) page.render(p, sitedata) end, singlepages) -- Render index pages tb.each(function(p) page.render(p, sitedata) end, indexpages)