ferron

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

commit 04dd71366d2ad4176ff27f9ef0f2b57057d215f7
parent d881dfa806cc63594b109f5d05edd3bbaec6b443
Author: Hugo Soucy <hsoucy@kronostechnologies.com>
Date:   Tue, 22 Jan 2019 15:19:53 -0500

Add navigation table to the metaconf

Diffstat:
Mferron/list.lua | 2++
Mferron/page.lua | 1+
2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/ferron/list.lua b/ferron/list.lua @@ -63,6 +63,8 @@ function list.render(listsource) list_conf_mt.permalink = site.config.baseurl .. fileutils.getdirname(fileutils.getrelpath(fileutils.removeextension(list), site)) -- Import site configuration in the metatable list_conf_mt["site"] = site.config + -- Import site navigation in the metatable + list_conf_mt["navigation"] = site.navigation -- Set a table for the list of entries list_conf_mt["entries"] = {} diff --git a/ferron/page.lua b/ferron/page.lua @@ -20,6 +20,7 @@ function page.render(pagesource) page_conf_mt.permalink = site.config.baseurl .. (fileutils.getplainname(page) ~= "index" and fileutils.getrelpath(fileutils.removeextension(page), site) .. ".html" or "") page_conf_mt.rellink = (fileutils.getplainname(page) ~= "index" and fileutils.getrelpath(fileutils.removeextension(page), site) .. ".html" or "") page_conf_mt["site"] = site.config + page_conf_mt["navigation"] = site.navigation if page_conf.id == nil then page_conf_mt.id = "tag:" .. site.config.domainname .. "," .. page_conf.date .. ":" .. string.sub(page_conf.date, 0, 4) .. "/" .. string.sub(page_conf.date, 6, 7) .. "/" .. fileutils.getplainname(page)