]> git.nbdom.net Git - nb.git/commitdiff
lib/lua/nb.lua
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 4 Jun 2018 17:49:19 +0000 (18:49 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 4 Jun 2018 17:49:19 +0000 (18:49 +0100)
lib/lua/nb.lua

index 4253e7432b98968524fc1f87cbc4eec08134c40f..cafba38e911e0ecd001ae850e73e2aed802f5d1d 100644 (file)
@@ -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