ferron

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

commit 7140b79479ba3c9ab01099f2261b0d7cc639bb58
parent f7fecc6b4f0732245f44d1be715a38f37120f3ff
Author: Hugo Soucy <hsoucy@kronostechnologies.com>
Date:   Tue,  2 Oct 2018 12:13:06 -0400

Rename `templateutils.setmustache` to `templateutils.processmustache`

Diffstat:
Mferron/content.lua | 6+++---
Mferron/feed.lua | 4++--
Mferron/list.lua | 2+-
Mferron/page.lua | 2+-
Mferron/tag.lua | 2+-
Mferron/utilities/template-utils.lua | 2+-
6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ferron/content.lua b/ferron/content.lua @@ -79,7 +79,7 @@ function content.makecontent(contenttype, contenttitle) -- Build the markdown file fileutils.pushfilecontent( contentpath .. archetype.filename .. ".md", - templateutils.setmustache( + templateutils.processmustache( fileutils.pullfilecontent(archetypepath .. archetypetype .. ".md" ), Ferron.site.path .. Ferron.site.siteconfig.paths.templates .. "/partials", archetype @@ -89,7 +89,7 @@ function content.makecontent(contenttype, contenttitle) -- Build the JSON file fileutils.pushfilecontent( contentpath .. archetype.filename .. ".json", - templateutils.setmustache( + templateutils.processmustache( fileutils.pullfilecontent(archetypepath .. archetypetype .. ".json"), Ferron.site.path .. Ferron.site.siteconfig.paths.templates .. "/partials", archetype @@ -102,7 +102,7 @@ function content.makecontent(contenttype, contenttitle) print("¤¤ The files `" .. contentpath .. "{" .. archetype.filename .. ".md," .. archetype.filename .. ".json}` have been created. ¤¤") else print("! Error, something went wrong !") - end + end end end diff --git a/ferron/feed.lua b/ferron/feed.lua @@ -27,7 +27,7 @@ function feed.makefeed() -- Build the Atom XML file fileutils.pushfilecontent( feedfile, - templateutils.setmustache( + templateutils.processmustache( fileutils.pullfilecontent(feedtemplate), feedpartials, feed_tb @@ -37,7 +37,7 @@ function feed.makefeed() -- Build the RSS 2 XML file fileutils.pushfilecontent( feedrssfile, - templateutils.setmustache( + templateutils.processmustache( fileutils.pullfilecontent(feedrsstemplate), feedpartials, feed_tb diff --git a/ferron/list.lua b/ferron/list.lua @@ -91,7 +91,7 @@ function list.makelist() -- Build the HTML file fileutils.pushfilecontent( list_htmlpath .. "/" .. fileutils.getplainname(list) .. ".html", - templateutils.setmustache( + templateutils.processmustache( fileutils.pullfilecontent(templatespath .. "/" .. (list_conf.template ~= nil and list_conf.template or "default-index") .. ".mustache"), templatespath .. "/partials", list_conf_mt diff --git a/ferron/page.lua b/ferron/page.lua @@ -53,7 +53,7 @@ function page.makepage() -- Build the HTML file fileutils.pushfilecontent( page_htmlpath .. "/" .. fileutils.getplainname(page) .. ".html", - templateutils.setmustache( + templateutils.processmustache( fileutils.pullfilecontent(page_template), templatespath .. "/partials", page_conf_mt diff --git a/ferron/tag.lua b/ferron/tag.lua @@ -50,7 +50,7 @@ function tag.maketagpage() -- Build the HTML file fileutils.pushfilecontent( htmlpath .. "/tag/" .. tag .. ".html", - templateutils.setmustache( + templateutils.processmustache( fileutils.pullfilecontent(Ferron.site.path .. Ferron.site.siteconfig.paths.templates .. "/tag.mustache"), Ferron.site.path .. Ferron.site.siteconfig.paths.templates .. "/partials", tag_tb diff --git a/ferron/utilities/template-utils.lua b/ferron/utilities/template-utils.lua @@ -5,7 +5,7 @@ local fileutils = require "ferron.utilities.file-utils" local templateutils = {} -- setmustache -function templateutils.setmustache(tpl, partialspath, data) +function templateutils.processmustache(tpl, partialspath, data) local partials = {} for i,v in ipairs(lustache:parse(tpl)) do