diff --git a/features/theme_configuration.feature b/features/theme_configuration.feature index 00ed81ae4cc..0c8da0168c5 100644 --- a/features/theme_configuration.feature +++ b/features/theme_configuration.feature @@ -3,24 +3,16 @@ Feature: Bundling Config file with Theme gems I want to be able to pre-configure my gemified theme In order to make it easier for other Jekyllites to use my theme - Scenario: Easy onboarding with a pre-configured theme - Given I have a configuration file with "theme" set to "test-theme" - And I have an "index.md" page that contains "{{ site.test_theme.skin }}" - When I run jekyll build - Then I should get a zero exit status - And the _site directory should exist - And I should see "aero" in "_site/index.html" - - Scenario: Disabling import of theme configuration entirely + Scenario: Enabling import of theme configuration Given I have a configuration file with: | key | value | | theme | test-theme | - | ignore_theme_config | true | + | import_theme_config | true | And I have an "index.md" page that contains "{{ site.test_theme.skin }}" When I run jekyll build Then I should get a zero exit status And the _site directory should exist - And I should not see "aero" in "_site/index.html" + And I should see "aero" in "_site/index.html" Scenario: A pre-configured theme with valid config file overriding Jekyll defaults Given I have a configuration file with "theme" set to "test-theme" diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index c392a1fa248..b0969865288 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -432,7 +432,7 @@ def collections_path private def load_theme_configuration(config) - return config if config["ignore_theme_config"] + return config unless config["import_theme_config"] == true theme_config_file = in_theme_dir("_config.yml") return config unless File.exist?(theme_config_file)