ferron

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

commit 4a22bfbb15e57217418053aba487c6dc2c072217
parent f025e2156c4cb3d5f1fcdac7d3cf775e69cb357c
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Fri,  1 Dec 2017 15:15:22 -0500

Put mimestable values in site.config

Diffstat:
Mfunctions/dispatch-nontextuals.lua | 2+-
Msites/ferron-ssg.tld/site.config.lua | 10+++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/functions/dispatch-nontextuals.lua b/functions/dispatch-nontextuals.lua @@ -5,7 +5,7 @@ local path = require("path") local tableutils = require("functions.table-utils") local function dispatchnontextuals(file, filesection) - local mimestable = {"image/svg+xml", "image/jpeg", "image/png", "application/pdf"} + local mimestable = Ferron.site.config.SITE.MIMETYPES path.each( path.dirname(file) .. "/*", "f", diff --git a/sites/ferron-ssg.tld/site.config.lua b/sites/ferron-ssg.tld/site.config.lua @@ -2,7 +2,7 @@ -- Website Configuration File -- -SITE = { +SITE = { DOMAINNAME = "ferron-ssg.tld", URL = "http://ferron-ssg.tld", URLDEV = "http://localhost:8181", @@ -32,5 +32,13 @@ SITE = { HTML = "/public_html", STATIC = "/static", TEMPLATES = "/templates" + }, + + -- Accepted mime types of the non-textual content + MIMETYPES = { + "image/svg+xml", + "image/jpeg", + "image/png", + "application/pdf" } }