ferron

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

commit aae7522b1650b881345bc846f65bc8ca22318f5f
parent 642e04ffae8cba0ba362dc280c6b2e8c2d8648e7
Author: Hugo Soucy <hsoucy@kronostechnologies.com>
Date:   Tue,  5 Feb 2019 08:26:56 -0500

Change ferron.lua to an alias to ferron/init.lua

Diffstat:
Mferron.lua | 79+------------------------------------------------------------------------------
Cferron.lua -> ferron/init.lua | 0
2 files changed, 1 insertion(+), 78 deletions(-)

diff --git a/ferron.lua b/ferron.lua @@ -1,78 +1 @@ --- --- Ferron SSG --- - --- Required Modules -inspect = require "inspect" -local lfs = require "lfs" -local config = require "ferron.config" -local site = require "ferron.site" -local content = require "ferron.content" -local page = require "ferron.page" -local list = require "ferron.list" -local link = require "ferron.link" -local static = require "ferron.static" -local plugin = require "ferron.plugin" -local app = require "ferron.app" - --- App's Globals --- Init the main namespace -Ferron = {} --- Set if the build need to be in devmode -Ferron.devmode = (arg[1] == "--dev" and true or false) --- Chosen site to build must be global -Ferron.site = { - location = lfs.currentdir() .. "/" .. config.sites, - config = nil, - path = nil, - pagestable = {}, - navigation = {}, -} - -Ferron.init = { - site.setsite, - site.sitereset, - site.setnavigation, -} - -Ferron.build = { - page.init, - list.init, - link.makeshorts, - link.makerewritemap, - static.init, -} - -if arg[1] == "--set" and arg[2] == "content" then - return content.setcontent(site.setsite()) -end - -if arg[1] == "--make" and arg[2] == "site" then - return site.startsite() -end - -if arg[1] == "--run" and type(arg[2]) == "string" and arg[2] ~= "" then - return plugin.run(site.setsite(), arg[2]) -end - -return app.exec(Ferron.init, Ferron.build) - ---[[ - @TODO API - - - App - -- Execution - -- Installing - - - Site - -- Information - -- Listing - -- Selection - -- Creation - -- Reseting - -- Building - - - Content (markdown) - -- Creation - -- Listing -]]-- +return require "ferron.init" diff --git a/ferron.lua b/ferron/init.lua