From 3c959af8d133b1f3317c8f6696873a6c00fd596e Mon Sep 17 00:00:00 2001 From: ashmaroli Date: Wed, 3 Jan 2018 00:48:26 +0530 Subject: [PATCH] Do not coerce layout paths in theme-gem to the source directory (#6603) Merge pull request 6603 --- features/incremental_rebuild.feature | 17 +++++++++++++++++ lib/jekyll/renderer.rb | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/features/incremental_rebuild.feature b/features/incremental_rebuild.feature index 128f5800..2ced57a6 100644 --- a/features/incremental_rebuild.feature +++ b/features/incremental_rebuild.feature @@ -66,3 +66,20 @@ Feature: Incremental rebuild Then I should get a zero exit status And the _site directory should exist And I should see "Basic Site with include tag: Regenerated by Jekyll" in "_site/index.html" + + Scenario: A themed-site and incremental regeneration + Given I have a configuration file with "theme" set to "test-theme" + And I have an "index.md" page that contains "Themed site" + When I run jekyll build --incremental --verbose + Then I should get a zero exit status + And the _site directory should exist + And I should see "Rendering: index.md" in the build output + And I should see "Themed site" in "_site/index.html" + When I wait 1 second + And I have an "about.md" page that contains "About Themed site" + When I run jekyll build --incremental --verbose + Then I should get a zero exit status + And the _site directory should exist + And I should not see "Rendering: index.md" in the build output + But I should see "Themed site" in "_site/index.html" + And I should see "About Themed site" in "_site/about.html" diff --git a/lib/jekyll/renderer.rb b/lib/jekyll/renderer.rb index 71e5b87c..1f83e2e5 100644 --- a/lib/jekyll/renderer.rb +++ b/lib/jekyll/renderer.rb @@ -198,7 +198,7 @@ module Jekyll return unless document.write? site.regenerator.add_dependency( site.in_source_dir(document.path), - site.in_source_dir(layout.path) + layout.path ) end