From: Nicolas Boisselier Date: Sun, 20 May 2018 16:17:04 +0000 (+0100) Subject: lib/lua/nb.lua X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=f4e146574a8461b0649bae34311ad78dfa156ccf;p=nb.git lib/lua/nb.lua --- diff --git a/lib/lua/nb.lua b/lib/lua/nb.lua index fe431bec..7a63aede 100644 --- a/lib/lua/nb.lua +++ b/lib/lua/nb.lua @@ -31,7 +31,7 @@ end function nb:ngx_location_tmpl(fheader,ffooter) -- See https://github.com/bungle/lua-resty-template -- location ~ \.(md|html)$ { --- content_by_lua 'package.path = ngx.var.NB_ROOT .. "/lib/lua/?.lua;" .. package.path local nb = require("nb") nb:ngx_location_tmpl()'; +-- content_by_lua_block { package.path = ngx.var.NB_ROOT .. "/lib/lua/?.lua;" .. package.path local nb = require("nb") nb:ngx_location_tmpl() } -- } if not fheader then fheader = ngx.var.document_root .. "/header.html" end if not ffooter then ffooter = ngx.var.document_root .. "/footer.html" end