Do not coerce layout paths in theme-gem to the source directory (#6603)

Merge pull request 6603
This commit is contained in:
ashmaroli 2018-01-03 00:48:26 +05:30 committed by jekyllbot
parent 9b8db401e7
commit 3c959af8d1
2 changed files with 18 additions and 1 deletions

View File

@ -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"

View File

@ -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