From: Nicolas Boisselier Date: Mon, 30 Apr 2018 17:39:35 +0000 (+0100) Subject: lib/lua/nb.lua X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=2a834644abbad4d6d3dd2a0c2e4479eb589be37b;p=nb.git lib/lua/nb.lua --- diff --git a/lib/lua/nb.lua b/lib/lua/nb.lua index 77a643bc..59e7c1d7 100644 --- a/lib/lua/nb.lua +++ b/lib/lua/nb.lua @@ -37,8 +37,8 @@ function nb:ngx_location_md() end end - local head = nb:readall(ngx.var.document_root .. "/head.html") - if head then template.render(head,vars) end + local header = nb:readall(ngx.var.document_root .. "/header.html") + if header then template.render(header,vars) end content = template.output(template.compile(content)(vars)) if string.match(file,'%.md$') then @@ -53,8 +53,8 @@ function nb:ngx_location_md() end - local tail = nb:readall(ngx.var.document_root .. "/tail.html") - if tail then template.render(tail,vars) end + local footer = nb:readall(ngx.var.document_root .. "/footer.html") + if footer then template.render(footer,vars) end ngx.exit(0) end