ferron

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

commit fca569f0212ec147a2275ece673a0e472e41b6d8
parent 6c6f93ec094d06776446dc27d2adcd0455fba096
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Wed, 29 Nov 2017 23:25:29 -0500

Add new methods

Diffstat:
Mfunctions/ferron-utils.lua | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/functions/ferron-utils.lua b/functions/ferron-utils.lua @@ -1,8 +1,12 @@ -- local ferronutils = {} -function ferronutils.set() - print("set something") +function ferronutils.getrelpath(file) + return file:sub((Ferron.site.path .. Ferron.site.config.SITE.PATHS.CONTENT):len() + 1) +end + +function ferronutils.sethtmlpath(folder) + return Ferron.site.path .. Ferron.site.config.SITE.PATHS.HTML .. folder end return ferronutils