From 8d939223c6db411709b9b341d92e9d0e001ea7f4 Mon Sep 17 00:00:00 2001 From: Roman Cheplyaka Date: Thu, 14 Dec 2017 18:16:00 +0000 Subject: [PATCH] Don't do anything in the incremental mode Fixes #103 --- lib/jekyll-archives.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/jekyll-archives.rb b/lib/jekyll-archives.rb index b67ade7..ae287c1 100644 --- a/lib/jekyll-archives.rb +++ b/lib/jekyll-archives.rb @@ -28,16 +28,18 @@ def initialize(config = nil) end def generate(site) - @site = site - @posts = site.posts - @archives = [] + unless site.incremental? + @site = site + @posts = site.posts + @archives = [] - @site.config["jekyll-archives"] = @config + @site.config["jekyll-archives"] = @config - read - @site.pages.concat(@archives) + read + @site.pages.concat(@archives) - @site.config["archives"] = @archives + @site.config["archives"] = @archives + end end # Read archive data from posts