commit d36d7e404f717e00fd3ecfdf9f46be3172048391 parent 0c0f72408d032e726c39ce86004cca84ff5d40de Author: Hugo Soucy <hugo@soucy.cc> Date: Sat, 18 Nov 2017 11:50:32 -0500 Change indentation Diffstat:
M | functions/make-pages.lua | | | 11 | +++++++---- |
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/functions/make-pages.lua b/functions/make-pages.lua @@ -5,7 +5,7 @@ local path = require("path") local fileutils = require("functions.file-utils") local templateutils = require("functions.template-utils") -local function makepages() +local function makepages() -- Loop in the content directory for file, attr in fileutils.getdirtree(Ferron.site.path .. Ferron.site.config.SITE.PATHS.CONTENT) do if attr.mode ~= "directory" @@ -31,9 +31,12 @@ local function makepages() md_metadatas.section = md_section md_metadatas.updated = md_updated md_metadatas.id = md_id - md_metadatas.permalink = (Ferron.devmode == true and Ferron.site.config.SITE.URLDEV or Ferron.site.config.SITE.URL) .. md_relpath .. ".html" - - Ferron.site.pagestable[md_key] = md_metadatas + md_metadatas.permalink = + (Ferron.devmode == true and Ferron.site.config.SITE.URLDEV or Ferron.site.config.SITE.URL) .. + (md_plainname ~= "index" and md_relpath .. ".html" or "") + + + Ferron.site.pagestable[md_key] = md_metadatas md_table = md_metadatas md_table["SITE"] = Ferron.site.config.SITE