satelito

Static [web] site (or page) generator (ssg) made with Lua script.
git clone git://soucy.cc/satelito.git
Log | Files | Refs | README

commit 5392ceceb7eaacab97ae1f08319f40ab1c3cf06e
parent 2aa1d1c960e6ce92d5d15e86f2d49491f51c268b
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sat,  2 Oct 2021 09:20:15 -0400

Add comments

Diffstat:
Msatelito/page.lua | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/satelito/page.lua b/satelito/page.lua @@ -10,13 +10,16 @@ local template = require 'satelito.template' -- @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) + -- Compile different parts of the page local post = etlua.compile(file.read(template.find(templates, filemeta.template))) local head = etlua.compile(file.read(template.find(templates, filemeta.head))) local navigation = etlua.compile(file.read(template.find(templates, filemeta.nav))) local footer = etlua.compile(file.read(template.find(templates, filemeta.footer))) local layout = etlua.compile(file.read(template.find(templates, filemeta.layout))) + -- Then put them all together local html = layout( lume.extend({}, filemeta, @@ -26,6 +29,7 @@ function page.make(filemeta, templates) {footer = footer(lume.extend({}, filemeta))} ) ) + -- Get the target location of the page local html_path = filemeta.exportlink return html, html_path