ferron

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

commit 0205710455b0ee781a532401f3b981076381596d
parent be1b2a88118818b577ed838abd7875ddfee8fea5
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Mon, 27 Apr 2020 14:52:18 -0400

Fix a bug in the makeshorts function

Diffstat:
Mferron/link.lua | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ferron/link.lua b/ferron/link.lua @@ -20,9 +20,9 @@ function link.makeshorts() if fl.isFile(links_db) == false then local counter = 0 - fl.pushfilecontent(links_db, '') + fl.pushfilecontent(links_db, '{}') - for k, v in tb.sortdescendingpairs(Ferron.site.pagestable) do + for _, v in tb.sortdescendingpairs(Ferron.site.pagestable) do if v.rellink ~= '' then counter = counter + 1 @@ -36,7 +36,7 @@ function link.makeshorts() else links = json.decode(fl.pullfilecontent(links_db)) - for k, v in tb.sortdescendingpairs(Ferron.site.pagestable) do + for _, v in tb.sortdescendingpairs(Ferron.site.pagestable) do if v.rellink ~= '' and links[v.rellink] == nil then table.insert(links_keyorder, v.rellink)