diff --git a/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb b/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb index b05996dc0769a7b8cc544b1f9904690e63ba3e04..429bf208d9692332e83e87390061ba6f630c42bd 100644 --- a/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb +++ b/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb @@ -382,9 +382,10 @@ module Jekyll @sources = @sources.flatten.compact end + # Only rebuild if the path doesn't exist def rebuild? !File.exist?(path) || sources.map do |f| - File.ctime(f) > File.ctime(path) + File.mtime(f) > File.mtime(path) end.any? end