diff options
Diffstat (limited to 'maker')
-rwxr-xr-x | maker | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -3,6 +3,8 @@ lfs = require "lfs" posix = require "posix" lustache = require "lustache" +yaml = require 'yaml' +yaml.configure{ load_numeric_scalars = false } require "lupin" require "corz" @@ -68,3 +70,15 @@ for n=1,8 do end build(path, "index", page) +for i, page in ipairs(config.static) do + local path = config.www .. "/" .. page.path + local data = nil + if type(page.src) == "string" then + data = yaml.loadpath(page.src) + else + data = page.src() + end + data.site = config + build(path, page.template, data) +end + |