commit 7edd3cbf1797aaff4313209c59e4a1ba2dd21e9d
parent a918adf47fbeef9b203c3f145e531a1fa10dc39f
Author: Hugo Soucy <hugo@soucy.cc>
Date: Wed, 9 Feb 2022 08:13:14 -0500
Remove a test in page
Diffstat:
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/satelito/page.lua b/satelito/page.lua
@@ -5,13 +5,13 @@ local etlua = require 'etlua'
local lume = require 'satelito.lib.lume.lume'
local file = require 'satelito.file'
local template = require 'satelito.template'
-local inspect = require 'inspect'
--- Build a page from markdown/lua to HTML
-- @name page.build
-- @param filepath a pathname to a markdown file
-- @return a string that is an HTML code block
-- @return a string that is a filepath
+
function page.make(filemeta, templates)
local head = etlua.compile(file.read(template.find(templates, filemeta.head)))
local navigation = etlua.compile(file.read(template.find(templates, filemeta.navigation)))
@@ -19,14 +19,6 @@ function page.make(filemeta, templates)
local footer = etlua.compile(file.read(template.find(templates, filemeta.footer)))
local layout = etlua.compile(file.read(template.find(templates, filemeta.layout)))
- if type(filemeta.partial) == 'table' then
- for k, v in pairs(filemeta.partial) do
- _G['partial_'..k] = etlua.compile(file.read(template.find(templates, filemeta.partial[k])))
-
- print(inspect(_G['partial_'..k]))
- end
- end
-
-- Then put them all together
local html = layout(
lume.extend({},