ferron

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

commit 40e08ac122affb7a8a7ede80c1b91b71194553c0
parent 9ebea28752f9c1b2fbba0078c68a74502494c1d8
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Tue, 30 Jan 2018 16:10:07 -0500

Refactoring dispatchnontextuals

Diffstat:
Mfunctions/dispatch-nontextuals.lua | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/functions/dispatch-nontextuals.lua b/functions/dispatch-nontextuals.lua @@ -15,18 +15,17 @@ local function dispatchnontextuals(file) local img = f local img_name = img:match("^.+/(.+)$") local img_relpath = img:sub((Ferron.site.path .. Ferron.site.config.SITE.PATHS.CONTENT):len() + 1) - local img_section_relpath = file_dirname:sub((Ferron.site.path .. Ferron.site.config.SITE.PATHS.CONTENT):len() + 1) - local img_dir_relpath = img_section_relpath:sub((Ferron.site.path .. Ferron.site.config.SITE.PATHS.CONTENT):len() + 1) local htmlfolder = Ferron.site.path .. Ferron.site.config.SITE.PATHS.HTML -- Then symlinks from those non-textuals for list index pages - --lfs.link("." .. img_relpath, htmlfolder .. "/" .. img_section .. "/" .. img_name, true) + --lfs.link("." .. img:sub((file_dirname):len() + 1), Ferron.site.path .. Ferron.site.config.SITE.PATHS.HTML .. img_relpath, true) -- Copy all non-textual contents (jpg, pdf, png, svg, etc.) to `public_html/` path.copy(img, htmlfolder .. img_relpath) - -- print("." .. img_dir_relpath .. "/" .. img_name) - print(img_section_relpath) + os.execute("pwd") + + print(f) end end, {recurse = true}