satelito

Static [web] site (or page) generator (ssg) made with Lua script.
git clone git://soucy.cc/satelito.git
Log | Files | Refs | README

commit 86066f2eb06e9fac99f603a7737b1af473b69e8c
parent 0838fe099d77d71ed0b9afbfaef28504a318606b
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Thu, 22 Apr 2021 10:27:34 -0400

Separate declaration an assignation of the time_created var

Diffstat:
Msatelito/model.lua | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/satelito/model.lua b/satelito/model.lua @@ -9,7 +9,7 @@ local markdown = require 'discount' -- lua-discount function model.set(filepath, config, contentdir) local pagemeta = file.get_metafile(filepath) or {} - local time_created = (pagemeta.date..pagemeta.datetime):gsub('%W','') + local time_created -- If required properties are nil if pagemeta.title == nil then @@ -24,6 +24,7 @@ function model.set(filepath, config, contentdir) pagemeta.datetime = os.date('%H:%M:%S', lfs.attributes(filepath).change) end -- + time_created = (pagemeta.date..pagemeta.datetime):gsub('%W','') -- Path properties pagemeta.relpath = file.get_relpath(filepath, contentdir)