ferron

Ferron is a fast and simple static website generator made with Lua.
Log | Files | Refs | Submodules | README | LICENSE

commit 8eb4a3606636b4bdea6caf14d192925d457df3dc
parent 71f424cbe2ff0c1149148062fa2d959a2613a57a
Author: Hugo Soucy <hugo.soucy@toumoro.com>
Date:   Sat, 22 Feb 2020 19:08:38 -0500

Add the lastupdated property

Diffstat:
Mferron/page.lua | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/ferron/page.lua b/ferron/page.lua @@ -63,14 +63,15 @@ end local function setpagemodel(page, sitedata) return { - content = markdown(fl.pullfilecontent(page)), + content = string.gsub(markdown(fl.pullfilecontent(page)), "\n", ""), navigation = sitedata.navigation, permalink = fl.getpermalink(page, sitedata), rellink = fl.getrellink(page, sitedata.content), site = sitedata.config, - updated = os.date('%Y-%m-%dT%H:%M:%S', lfs.attributes(page).modification), id = fl.setpageid(page, sitedata), entries = {}, + updated = os.date('%Y-%m-%dT%H:%M:%S', lfs.attributes(page).modification), + lastupdated = os.date('%Y-%m-%dT%H:%M:%S', fl.getlastupdateddate(sitedata.nodes)) } end @@ -143,9 +144,7 @@ function page.render(page, sitedata) ) ) - --print(lfs.attributes(page).size) - - return --print(metaTable.date .. ' - ' .. metaTable.title) + return print(metaTable.content) end function page.makepages(sitedata) @@ -162,7 +161,7 @@ function page.makepages(sitedata) print('ยง ' .. tb.length(Ferron.site.pagestable) .. ' HTML pages have been created.') print('==========') - return --print(inspect(Ferron.site)) + return end return setmetatable(page, pagemeta)