diff options
Diffstat (limited to 'src/lua-script/script.lua')
-rw-r--r-- | src/lua-script/script.lua | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/lua-script/script.lua b/src/lua-script/script.lua index 0a6323a..f372b2b 100644 --- a/src/lua-script/script.lua +++ b/src/lua-script/script.lua @@ -485,27 +485,29 @@ return function(config) output_file:write(output_data) output_file:close() - for pattern in pairs(argent.config.rss_include) do - if string.match(filename, pattern) - or string.match(parent..filename, pattern) - then -- add to the RSS feed! - if not result.date then - argent.log( - 'warn', - fmt( - '%q did not specify a date; it will not be included in rss.xml!', - parent..filename + if argent.rss_channel then + for pattern in pairs(argent.config.rss_include) do + if string.match(filename, pattern) + or string.match(parent..filename, pattern) + then -- add to the RSS feed! + if not result.date then + argent.log( + 'warn', + fmt( + '%q did not specify a date; it will not be included in rss.xml!', + parent..filename + ) ) - ) - return + return + end + + argent.rss_channel:addItem{ + title=result.title, + link=argent.config.site_address..parent..output_name, + description = result.description, + pubDate = result.date, + } end - - argent.rss_channel:addItem{ - title=result.title, - link=argent.config.site_address..parent..output_name, - description = result.description, - pubDate = result.date, - } end end end |