ferron

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

commit 479436a52e11fdb9ecc0c2a4c4182e432b2703b0
parent 0eb51d91d2e4b3cbcb1ec43b901a61b9bb00e67a
Author: Hugo Soucy <hsoucy@kronostechnologies.com>
Date:   Fri,  1 Feb 2019 16:14:10 -0500

Start to simplify the code according to the Lua Style Guide

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

diff --git a/ferron/site.lua b/ferron/site.lua @@ -33,7 +33,7 @@ end function site.setsite(sitename) local siteslist = site.getsitelist() - local whichsite = nil + local whichsite if #siteslist > 1 and not sitename then repeat @@ -53,8 +53,8 @@ function site.setsite(sitename) end -- Assign values to Ferron.site.path and Ferron.site.config - Ferron.site.path = Ferron.site.location .. (sitename ~= nil and sitename or siteslist[tonumber(whichsite)]) - Ferron.site.config = tableutils.extend({}, config, site.getsiteconfig((sitename ~= nil and sitename or siteslist[tonumber(whichsite)]))) + Ferron.site.path = Ferron.site.location .. (sitename or siteslist[tonumber(whichsite)]) + Ferron.site.config = tableutils.extend({}, config, (site.getsiteconfig(sitename or siteslist[tonumber(whichsite)]))) -- Have different values if devmode is at true or not Ferron.site.config.baseurl = (Ferron.devmode == true and Ferron.site.config.urldev or Ferron.site.config.url)