satelito

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

commit d38feaae1dd5daf65c05ac0aae6d830f9780cb58
parent 9e5a9e37c1e606b3567145577c810133fe008862
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Tue, 30 Mar 2021 08:50:56 -0400

Set config as an optional argument

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

diff --git a/satelito/model.lua b/satelito/model.lua @@ -8,9 +8,9 @@ local file = require 'satelito.file' local site = require 'satelito.site' local inspect = require 'inspect' -function model.get(filepath) +function model.get(filepath, siteconfig) -- The site config.lua file - local config = assert(site.set_config(filepath)) + local config = (siteconfig or site.set_config(filepath)) -- The metadata file of a filepath local parameters_file = lfs.attributes(filepath:match('(.+)%..*') .. '.lua') and dofile(filepath:match('(.+)%..*') .. '.lua')