ferron

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

commit 8e95d4eb08fd233c0bc1cddbae325eabff55de84
parent 8f1392fb07e0a6129e374405e19968734fa99a97
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sat, 18 Aug 2018 16:56:57 -0400

Remove the prefetch mecanism

Diffstat:
Mferron/site.lua | 3+--
Mferron/static.lua | 6++----
2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/ferron/site.lua b/ferron/site.lua @@ -56,8 +56,7 @@ function site.setsite() until (tableutils.haskey(sites_list, tonumber(whichsite))) == true Ferron.site = site.getsiteinfos(sites_list[tonumber(whichsite)]) - Ferron.site.siteconfig.baseurl = (Ferron.devmode == true and Ferron.site.siteconfig.urldev or Ferron.site.siteconfig.url) - Ferron.site.siteconfig.prefetchlist = {} + Ferron.site.siteconfig.baseurl = (Ferron.devmode == true and Ferron.site.siteconfig.urldev or Ferron.site.siteconfig.url) return Ferron.site end diff --git a/ferron/static.lua b/ferron/static.lua @@ -13,13 +13,13 @@ local tableutils = require "ferron.utilities.table-utils" local static = {} function static.dispatch(file) - local mimestable = Ferron.site.siteconfig.mimetypes - local prefetchedtable = Ferron.site.siteconfig.prefetchlist + local mimestable = Ferron.site.siteconfig.mimetypes path.each( path.dirname(file) .. "/*", "f", function(f) if tableutils.hasvalue(mimestable, mimetypes.guess(f)) then + print(f) local listindex_dirname = path.dirname(file) local img = f local img_name = img:match("^.+/(.+)$") @@ -31,8 +31,6 @@ function static.dispatch(file) -- Copy all non-textual contents (jpg, pdf, png, svg, etc.) to `public_html/` path.copy(img, htmlfolder .. img_relpath) - - prefetchedtable[#prefetchedtable + 1] = img_relpath end end, {recurse = true}