ferron

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

plugin.lua (281B)


      1 -- plugin.lua
      2 local plugin = {}
      3 local pluginmeta = {
      4   __call = function(self, key, vars)
      5     print(key)
      6   end
      7 }
      8 
      9 function plugin.run(site, plugname)
     10   local plugin = require(site.plugins .. '/' .. plugname)
     11 
     12   return plugin.init(site)
     13 end
     14 
     15 return setmetatable(plugin, pluginmeta)