Merge pull request #232 from bhollis/frontmatter_page
Feature test for setting page setting through frontmatter
This commit is contained in:
commit
56e0c1755c
10
middleman-core/features/frontmatter_page_settings.feature
Normal file
10
middleman-core/features/frontmatter_page_settings.feature
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
Feature: Setting page settings through frontmatter
|
||||||
|
Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter
|
||||||
|
Given a successfully built app at "frontmatter-settings-app"
|
||||||
|
Then the following files should exist:
|
||||||
|
| build/proxied/index.html |
|
||||||
|
| build/no_index.html |
|
||||||
|
And the file "build/alternate_layout/index.html" should contain "Alternate layout"
|
||||||
|
And the following files should not exist:
|
||||||
|
| build/ignored/index.html |
|
||||||
|
| build/no_index/index.html |
|
|
@ -0,0 +1,4 @@
|
||||||
|
activate :directory_indexes
|
||||||
|
|
||||||
|
# Proxy ignored.html, which should ignore itself through a frontmatter
|
||||||
|
page 'proxied.html', :proxy => 'ignored.html'
|
|
@ -0,0 +1,3 @@
|
||||||
|
Alternate layout!
|
||||||
|
|
||||||
|
<%= yield %>
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
layout: alternate
|
||||||
|
---
|
||||||
|
|
||||||
|
This uses an alternate layout
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
ignored: true
|
||||||
|
---
|
||||||
|
|
||||||
|
This file ignores itself! But it can still be proxied.
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
directory_index: false
|
||||||
|
---
|
||||||
|
|
||||||
|
This should not be put in no_index/index.html - it goes to no_index.html
|
Loading…
Reference in a new issue