ferron

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

commit 1010c0d2ddc7d468e440519cf987a1941e0287cf
parent 1df726ef79660c83d82d2f175b133f2e54a83c49
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Mon, 17 Dec 2018 17:16:35 -0500

Replace currentdir and mkdir

Diffstat:
Mferron/site.lua | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ferron/site.lua b/ferron/site.lua @@ -1,11 +1,12 @@ local path = require "path" +local lfs = require "lfs" local config = require "ferron.config" local tableutils = require "ferron.utilities.table-utils" local fileutils = require "ferron.utilities.file-utils" local site = {} -site.location = path.currentdir() .. "/" .. config.sites +site.location = lfs.currentdir() .. "/" .. config.sites function site.listsites() -- Create a simple array with the directory name of the sites @@ -77,7 +78,7 @@ function site.makesite() newsite.name = io.read() newsite.location = site.location .. newsite.name - path.copy(newsite.sample .. "/*", path.mkdir(newsite.location), {delay = true; recurse = true}) + path.copy(newsite.sample .. "/*", fileutils.mkdir(newsite.location), {delay = true; recurse = true}) if fileutils.isDirectory(newsite.location) then return print("Your new website is ready to be cutomize here '" .. newsite.location .. "'!")