1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
Feature: Configuring Gem-based Themes
As a hacker who likes to share my expertise
I want to be able to configure my gemified theme
In order to make it easier for other Jekyllites to use my theme
Scenario: A site not using a gem-based theme
Given I have a configuration file with:
| key | value |
| exclude | [Gemfile, Gemfile.lock] |
And I have a Gemfile with plugin:
| name | path |
| test-plugin | ../../test/fixtures/test-plugin |
When I run bundle exec jekyll build
Then I should get a zero exit status
And the _site directory should exist
And the "_site/test-feed.xml" file should exist
Scenario: Theme-gem has a config file with valid 'gems' array
Given I have a configuration file with:
| key | value |
| theme | test-theme |
| exclude | [Gemfile, Gemfile.lock] |
And I have a Gemfile with plugin:
| name | path |
| test-plugin | ../../test/fixtures/test-plugin |
When I run bundle exec jekyll build
Then I should get a zero exit status
And the _site directory should exist
And the "_site/test-feed.xml" file should exist
Scenario: Overriding the 'gems' array in a config file within theme-gem
Given I have a configuration file with:
| key | value |
| theme | test-theme |
| gems | [jekyll-data, another-test-plugin] |
| exclude | [Gemfile, Gemfile.lock] |
And I have a Gemfile with plugin:
| name | path |
| another-test-plugin | ../../test/fixtures/another-test-plugin |
When I run bundle exec jekyll build
Then I should get a zero exit status
And the _site directory should exist
And the "_site/test-sitemap.xml" file should exist
And the "_site/test-feed.xml" file should not exist
Scenario: Theme-gem has a config file with valid '<theme-name>' object
Given I have a configuration file with:
| key | value |
| theme | test-theme |
| gems | [jekyll-data] |
| exclude | [Gemfile, Gemfile.lock] |
And I have a valid Gemfile
And I have a "page.md" file with content:
"""
---
---
theme-logo : 
theme-variant : {{ theme.theme_variant }}
"""
When I run bundle exec jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "theme-logo : <img src="logo.png" alt="theme-logo" />" in "_site/page.html"
And I should see "theme-variant : Charcoal" in "_site/page.html"
|