From 0f4ebe27d2820c32ed7df74d4be8912bd73a53ac Mon Sep 17 00:00:00 2001 From: sanine Date: Wed, 5 Jan 2022 15:32:55 -0600 Subject: set plugin directory before loading layouts --- src/lua-script/script.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lua-script/script.lua') diff --git a/src/lua-script/script.lua b/src/lua-script/script.lua index 2e896ae..e0ecb4d 100644 --- a/src/lua-script/script.lua +++ b/src/lua-script/script.lua @@ -249,6 +249,12 @@ return function(config) argent.log('info', 'noprocess: '..set_tostring(argent.config.noprocess)) argent.log('info', 'rss files: '..set_tostring(argent.config.rss_include)) + if argent.config.plugin_directory then + package.path = + add_end_slash(argent.currentWorkingDirectory()) + ..argent.config.plugin_directory..'?.lua;'..package.path + end + if argent.config.layout_directory then argent.layouts = load_layouts() else @@ -256,12 +262,6 @@ return function(config) end argent.log('info', fmt('available layouts: %s', set_tostring(argent.layouts))) - if argent.config.plugin_directory then - package.path = - add_end_slash(argent.currentWorkingDirectory()) - ..argent.config.plugin_directory..'?.lua;'..package.path - end - if argent.config.rss_include then if not argent.config.site_address then error('rss_include is set, but site_address is not!') -- cgit v1.2.1