satelito

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

commit 07d34cf5b0f4c7900096c59be383505b0bba25e5
parent 119e884e72ea2f1e778caa01310461dfd6605bd6
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sun, 25 Sep 2022 12:16:18 -0400

Change the build duration message.

Diffstat:
Msatelito/site.lua | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/satelito/site.lua b/satelito/site.lua @@ -28,8 +28,10 @@ function site.get_config(filepath) return site.get_config(dir_parent) end --- Make the site +-- Make the site (from the sitemap) function site.make(sitemap, export, timestart) + local duration + for i = 1, #sitemap do local html, html_path local feed_xml, feed_xml_path @@ -112,12 +114,12 @@ function site.make(sitemap, export, timestart) end end + duration = os.difftime(os.time(), timestart) > 0 + and 'in approximately '..os.difftime(os.time(), timestart)..' second(s).' + or 'in less than 1 second.' + print('--------------------------------------------------------------------------') - print( - 'Satelito built ' - ..lume.count(sitemap)..' HTML page(s) in approximately ' - ..os.difftime(os.time(), timestart)..' second(s).' - ) + print('Satelito built '..lume.count(sitemap)..' HTML page(s) '..duration) end return site