ferron

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

commit 94270f88391c06122874f691ef321cc962be4bfd
parent 5143d1022751f3e4a1219e6a4f4e884c59183082
Author: Hugo Soucy <hsoucy@kronostechnologies.com>
Date:   Fri, 12 Oct 2018 10:42:36 -0400

Rename Ferron.sites by site.location

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

diff --git a/ferron/site.lua b/ferron/site.lua @@ -5,13 +5,13 @@ local fileutils = require "ferron.utilities.file-utils" local site = {} -Ferron.sites = path.currentdir() .. "/" .. config.paths.sites +site.location = path.currentdir() .. "/" .. config.sites function site.listsites() -- Create a simple array with the directory name of the sites local sites_list = {} - for s in path.each(Ferron.sites .. "*", "f", {delay = true; reverse = true;}) do + for s in path.each(site.location .. "*", "f", {delay = true; reverse = true;}) do if path.isdir(s) then sites_list[#sites_list+1] = s:match("^.+/(.+)$") end @@ -26,7 +26,7 @@ function site.getsiteinfos(sitename) local site_config = require "site-config" -- Create a table with the basic infos of the site local site_infos = { - path = Ferron.sites .. sitename, + path = site.location .. sitename, siteconfig = site_config, pagestable = {}, } @@ -67,7 +67,7 @@ function site.makesite() name = nil, location = nil, config = nil, - sample = Ferron.sites .. "ferron-ssg.tld", + sample = site.location .. "ferron-ssg.tld", } io.write("How do you want names your new website? \n") @@ -75,7 +75,7 @@ function site.makesite() io.flush() newsite.name = io.read() - newsite.location = Ferron.sites .. newsite.name + newsite.location = site.location .. newsite.name path.copy(newsite.sample .. "/*", path.mkdir(newsite.location), {delay = true; recurse = true})