ferron

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

commit 4bb4ce14fc94d7296748b91e4fc3ddb68cbb776d
parent 38920697bc4307e6b8d4fb50173774913e2b07cd
Author: Hugo Soucy <hugo.soucy@toumoro.com>
Date:   Thu, 12 Mar 2020 09:28:00 -0400

Merge branch 'master' of github.com:hs0ucy/Ferron

Diffstat:
Mferron/feed.lua | 7++++++-
Mferron/page.lua | 4++--
Mferron/utilities/file-utils.lua | 2+-
3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ferron/feed.lua b/ferron/feed.lua @@ -12,6 +12,11 @@ local tp = require 'ferron.utilities.template-utils' function feed.makefeed(data, destination) local feedtypes = site.config.feedtypes + local feeddata = data + + feeddata['content'] = nil + print(inspect(feeddata)) + -- print(type(feeddata)) for k, v in pairs(feedtypes) do local feedtemplate = site.templates .. '/feed/' .. k .. '.mustache' @@ -21,7 +26,7 @@ function feed.makefeed(data, destination) destination .. '/' .. v.name .. v.extension, tp.rendermustache( fl.pullfilecontent(feedtemplate), - data + feeddata ) ) else diff --git a/ferron/page.lua b/ferron/page.lua @@ -63,7 +63,7 @@ end local function setpagemodel(page, sitedata) return { - content = string.gsub(markdown(fl.pullfilecontent(page)), "\n", ""), + content = markdown(fl.pullfilecontent(page)), navigation = sitedata.navigation, permalink = fl.getpermalink(page, sitedata), rellink = fl.getrellink(page, sitedata.content), @@ -144,7 +144,7 @@ function page.render(page, sitedata) ) ) - return print(metaTable.content) + return -- print(metaTable.content) end function page.makepages(sitedata) diff --git a/ferron/utilities/file-utils.lua b/ferron/utilities/file-utils.lua @@ -125,7 +125,7 @@ end -- getlastmodified function fileutils.getlastupdateddate(filelist) - return math.max(unpack(tb.map( + return math.max(table.unpack(tb.map( function(fl) if fileutils.isFile(fl) then return lfs.attributes(fl).modification