Logo: Relish

  1. Sign in

Project: Middleman-core

Custom layouts

In order easily switch between relative and absolute paths

Scenarios
Using custom :layout attribute
Given
page "/custom-layout.html" has layout "custom"
And
the Server is running at "custom-layout-app2"
When
I go to "/custom-layout.html"
Then
I should see "Custom Layout"
Using with_layout block
Given
"/custom-layout.html" with_layout block has layout "custom"
And
the Server is running at "custom-layout-app2"
When
I go to "/custom-layout.html"
Then
I should see "Custom Layout"
Using with_layout block with globs
Given
"/custom-*" with_layout block has layout "custom"
And
the Server is running at "custom-layout-app2"
When
I go to "/custom-layout.html"
Then
I should see "Custom Layout"
Using custom :layout attribute with folders
Given
page "/custom-layout-dir/" has layout "custom"
And
the Server is running at "custom-layout-app2"
When
I go to "/custom-layout-dir"
Then
I should see "Custom Layout"
When
I go to "/custom-layout-dir/"
Then
I should see "Custom Layout"
When
I go to "/custom-layout-dir/index.html"
Then
I should see "Custom Layout"
Using custom :layout attribute with folders
Given
page "/custom-layout-dir" has layout "custom"
And
the Server is running at "custom-layout-app2"
When
I go to "/custom-layout-dir"
Then
I should see "Custom Layout"
When
I go to "/custom-layout-dir/"
Then
I should see "Custom Layout"
When
I go to "/custom-layout-dir/index.html"
Then
I should see "Custom Layout"
Using custom :layout attribute with folders
Given
page "/custom-layout-dir/index.html" has layout "custom"
And
the Server is running at "custom-layout-app2"
When
I go to "/custom-layout-dir"
Then
I should see "Custom Layout"
When
I go to "/custom-layout-dir/"
Then
I should see "Custom Layout"
When
I go to "/custom-layout-dir/index.html"
Then
I should see "Custom Layout"

Last published about 5 years ago by middleman.