Merge pull request #232 from bhollis/frontmatter_page

Feature test for setting page setting through frontmatter
This commit is contained in:
Thomas Reynolds 2012-01-07 15:38:03 -08:00
commit 56e0c1755c
6 changed files with 32 additions and 0 deletions

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

View file

@ -0,0 +1,4 @@
activate :directory_indexes
# Proxy ignored.html, which should ignore itself through a frontmatter
page 'proxied.html', :proxy => 'ignored.html'

View file

@ -0,0 +1,3 @@
Alternate layout!
<%= yield %>

View file

@ -0,0 +1,5 @@
---
layout: alternate
---
This uses an alternate layout

View file

@ -0,0 +1,5 @@
---
ignored: true
---
This file ignores itself! But it can still be proxied.

View file

@ -0,0 +1,5 @@
---
directory_index: false
---
This should not be put in no_index/index.html - it goes to no_index.html