summaryrefslogtreecommitdiff
path: root/maker
diff options
context:
space:
mode:
Diffstat (limited to 'maker')
-rwxr-xr-xmaker14
1 files changed, 14 insertions, 0 deletions
diff --git a/maker b/maker
index 043975c..c0ae292 100755
--- a/maker
+++ b/maker
@@ -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
+