commit 41be4f0043d05a9e4ed650a6f816c1cf8e180464
parent ee97eb8da6d9d3633d3e25852fa597161250e2cd
Author: Hugo Soucy <hugo@soucy.cc>
Date: Sun, 27 Feb 2022 13:30:44 -0500
Apply the exportpath parameter
Diffstat:
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/satelito/site.lua b/satelito/site.lua
@@ -47,9 +47,18 @@ function site.make(sitemap, templates, export, timestart)
print(sitemap[i].title ..' PGE ' .. p)
--print(inspect(paginated[p]))
sitemap[i].children = paginated[p]
- end
- end
+ -- Make the page
+ html, html_path = page.make(sitemap[i], templates, sitemap[i].exportlink:match("(.*/)")..'pg'..p..'.html')
+
+ -- Export the page
+ if export then
+ file.export(html_path, html)
+ else
+ print(html)
+ end
+ end
+ else
-- Make the page
html, html_path = page.make(sitemap[i], templates)
@@ -59,6 +68,7 @@ function site.make(sitemap, templates, export, timestart)
else
print(html)
end
+ end
-- Feed
if file.is_index(sitemap[i].relpath) and export then