ferron

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

commit b846e83880b6846a3f4507ceec69d20da79c118b
parent fdc517d136f7b3ed22aca1ddf1b934b4d7968d1e
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sat,  3 Nov 2018 20:45:55 -0400

Remove etlua tests

Diffstat:
Mferron.lua | 2--
Mferron/utilities/template-utils.lua | 21+++------------------
2 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/ferron.lua b/ferron.lua @@ -8,8 +8,6 @@ Ferron = { site = {} } -- Set if the build need to be in devmode Ferron.devmode = (arg[1] == "--dev" and true or false) -etlua = require "etlua" - if Ferron.devmode == true then inspect = require "inspect" end diff --git a/ferron/utilities/template-utils.lua b/ferron/utilities/template-utils.lua @@ -39,26 +39,11 @@ function templateutils.rendermustache(tpl, partialspath, data) return lustache:render(tpl, data, partials) end --- [[ --- local etlua = require("etlua") - --- local layout = [[ --- <div> --- <%= render_view() %> --- </div> --- ]] - --- local view = [[ --- <p>Hello, World!</p> --- ]] - --- etlua.render(layout, { render_view = etlua.compile(view) } ---]] +-- process etlua function templateutils.renderetlua(template, data) - -- local render = etlua.compile(template) - local render = etlua.render(template, {rendersub = etlua.compile(template)}) + local render = etlua.compile(template) - return render + return render(data) end -- process template