Disable default layouts for documents with a layout: none declaration (#5933)

Merge pull request 5933
This commit is contained in:
ashmaroli
2017-05-16 01:36:23 +05:30
committed by jekyllbot
parent e0dfff0122
commit 4d9c93e491
2 changed files with 48 additions and 3 deletions

View File

@@ -40,6 +40,44 @@ Feature: Rendering
And I should not see "Ahoy, indeed!" in "_site/index.css"
And I should not see "Ahoy, indeed!" in "_site/index.js"
Scenario: Ignore defaults and don't place documents with layout set to 'none'
Given I have a "index.md" page with layout "none" that contains "Hi there, {{ site.author }}!"
And I have a _trials directory
And I have a "_trials/no-layout.md" page with layout "none" that contains "Hi there, {{ site.author }}!"
And I have a "_trials/test.md" page with layout "null" that contains "Hi there, {{ site.author }}!"
And I have a none layout that contains "{{ content }}Welcome!"
And I have a page layout that contains "{{ content }}Check this out!"
And I have a configuration file with:
| key | value |
| author | John Doe |
| collections | {trials: {output: true}} |
| defaults | [{scope: {path: ""}, values: {layout: page}}] |
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should not see "Welcome!" in "_site/trials/no-layout.html"
And I should not see "Check this out!" in "_site/trials/no-layout.html"
But I should see "Check this out!" in "_site/trials/test.html"
And I should see "Welcome!" in "_site/index.html"
Scenario: Don't place documents with layout set to 'none'
Given I have a "index.md" page with layout "none" that contains "Hi there, {{ site.author }}!"
And I have a _trials directory
And I have a "_trials/no-layout.md" page with layout "none" that contains "Hi there, {{ site.author }}!"
And I have a "_trials/test.md" page with layout "page" that contains "Hi there, {{ site.author }}!"
And I have a none layout that contains "{{ content }}Welcome!"
And I have a page layout that contains "{{ content }}Check this out!"
And I have a configuration file with:
| key | value |
| author | John Doe |
| collections | {trials: {output: true}} |
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should not see "Welcome!" in "_site/trials/no-layout.html"
But I should see "Check this out!" in "_site/trials/test.html"
And I should see "Welcome!" in "_site/index.html"
Scenario: Render liquid in Sass
Given I have an "index.scss" page that contains ".foo-bar { color:{{site.color}}; }"
And I have a configuration file with "color" set to "red"