From: Nicolas Boisselier Date: Mon, 4 Jun 2018 17:49:19 +0000 (+0100) Subject: lib/lua/nb.lua X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=4846fa595bb4a0e6dfc5be1a23156db981a5bf0a;p=nb.git lib/lua/nb.lua --- diff --git a/lib/lua/nb.lua b/lib/lua/nb.lua index 4253e743..cafba38e 100644 --- a/lib/lua/nb.lua +++ b/lib/lua/nb.lua @@ -41,8 +41,8 @@ function nb:ngx_location_tmpl(fheader,ffooter) local vars = { } - if not fheader then fheader = root .. "/header.tmpl.html" end - if not ffooter then ffooter = root .. "/footer.tmpl.html" end + if not fheader then fheader = root .. "/tmpl/header.html" end + if not ffooter then ffooter = root .. "/tmpl/footer.html" end local template = require "resty.template" -- NB 25.05.18 template.print = function(s) @@ -61,7 +61,7 @@ function nb:ngx_location_tmpl(fheader,ffooter) template.markdown = require "resty.hoedown" -- ngx.say('zaza' .. template.markdown.html.flags.table) --content = self:md2html(content) - content = '{(header.tmpl.html)}{*markdown([[' .. content .. ']], { smartypants = false, table = true })*}{(footer.tmpl.html)}' + content = '{(header.html)}{*markdown([[' .. content .. ']], { smartypants = false, table = true })*}{(footer.html)}' -- content = self:md2html(content) ishtml = false elseif string.match(file,'%.md$') then