gluon/scripts/site_config.lua
Matthias Schiffer f23e024787 Convert site.conf to JSON during build
This will allow us to use its content from other languages than Lua as
well.
2016-01-02 23:49:25 +01:00

10 lines
291 B
Lua

local config = os.getenv('GLUON_SITE_CONFIG')
local function loader()
coroutine.yield('return ')
coroutine.yield(io.open(config):read('*a'))
end
-- setfenv doesn't work with Lua 5.2 anymore, but we're using 5.1
return setfenv(assert(load(coroutine.wrap(loader), 'site.conf')), {})()