ferron

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

commit 240d6db62c0b7a0e0328d2bf66709342058c92e0
parent 0205710455b0ee781a532401f3b981076381596d
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Mon, 27 Apr 2020 19:28:22 -0400

Desactivate the mods function

Diffstat:
Mferron/page.lua | 45+++++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 22 deletions(-)

diff --git a/ferron/page.lua b/ferron/page.lua @@ -156,28 +156,29 @@ function page.makepages(sitedata) -- 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 + -- 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 )