diff --git a/lib/github-pages/configuration.rb b/lib/github-pages/configuration.rb index 081e90c3..f1759a74 100644 --- a/lib/github-pages/configuration.rb +++ b/lib/github-pages/configuration.rb @@ -159,12 +159,7 @@ def restrict_and_config_markdown_processor(config) # If the user has set a 'theme', then see if we can automatically use remote theme instead. def migrate_theme_to_remote_theme(config) - return unless config["theme"] - return unless GitHubPages::Plugins::THEMES_TO_CONVERT_TO_REMOTE_THEMES.key?(config["theme"]) - - theme_name = config.delete("theme") - config["remote_theme"] ||= GitHubPages::Plugins::THEMES_TO_CONVERT_TO_REMOTE_THEMES[theme_name] - config["plugins"] = Array(config["plugins"]).concat(["jekyll-remote-theme"]).uniq + # This functionality has been rolled back due to complications with jekyll-remote-theme. end # If the user's 'exclude' config is the default, also exclude the CNAME diff --git a/lib/github-pages/plugins.rb b/lib/github-pages/plugins.rb index 3f4180d6..afabca6f 100644 --- a/lib/github-pages/plugins.rb +++ b/lib/github-pages/plugins.rb @@ -49,6 +49,20 @@ class Plugins # Themes THEMES = { "minima" => "2.5.1", + "jekyll-swiss" => "1.0.0", + "jekyll-theme-primer" => "0.6.0", + "jekyll-theme-architect" => "0.2.0", + "jekyll-theme-cayman" => "0.2.0", + "jekyll-theme-dinky" => "0.2.0", + "jekyll-theme-hacker" => "0.2.0", + "jekyll-theme-leap-day" => "0.2.0", + "jekyll-theme-merlot" => "0.2.0", + "jekyll-theme-midnight" => "0.2.0", + "jekyll-theme-minimal" => "0.2.0", + "jekyll-theme-modernist" => "0.2.0", + "jekyll-theme-slate" => "0.2.0", + "jekyll-theme-tactile" => "0.2.0", + "jekyll-theme-time-machine" => "0.2.0", }.freeze # Themes to convert to remote themes diff --git a/spec/github-pages/configuration_spec.rb b/spec/github-pages/configuration_spec.rb index 4f41a7ac..36137e17 100644 --- a/spec/github-pages/configuration_spec.rb +++ b/spec/github-pages/configuration_spec.rb @@ -20,7 +20,6 @@ ENV.delete("DISABLE_WHITELIST") ENV["JEKYLL_ENV"] = "test" ENV["PAGES_REPO_NWO"] = "github/pages-gem" - stub_request_for_remote_theme(:repo => "pages-themes/primer", :revision => "v0.6.0", :filename => "primer-0.6.0.zip") end context "#effective_config" do @@ -104,10 +103,9 @@ context "themes" do context "with no theme set" do it "sets the theme" do - expect(effective_config["plugins"]).to include("jekyll-remote-theme") expect(site.theme).to_not be_nil expect(site.theme).to be_a(Jekyll::Theme) - expect(site.theme.name).to eql("primer") + expect(site.theme.name).to eql("jekyll-theme-primer") end end @@ -120,16 +118,10 @@ ) end - before(:each) do - stub_request_for_remote_theme(:repo => "pages-themes/merlot", :revision => "v0.2.0", :filename => "merlot-0.2.0.zip") - end - it "respects the theme" do - expect(configuration["theme"]).to be_nil - expect(configuration["remote_theme"]).to eq(GitHubPages::Plugins::THEMES_TO_CONVERT_TO_REMOTE_THEMES["jekyll-theme-merlot"]) expect(site.theme).to_not be_nil expect(site.theme).to be_a(Jekyll::Theme) - expect(site.theme.name).to eql("merlot") + expect(site.theme.name).to eql("jekyll-theme-merlot") end end @@ -144,6 +136,10 @@ end end + it "plugins don't include jekyll remote theme" do + expect(effective_config["plugins"]).to_not include("jekyll-remote-theme") + end + context "with a remote theme" do let(:test_config) do { @@ -156,7 +152,6 @@ end it "plugins include jekyll remote theme" do - stub_request_for_remote_theme(:repo => "foo/bar", :revision => "HEAD", :filename => "primer-0.6.0.zip") expect(effective_config["plugins"]).to include("jekyll-remote-theme") end end diff --git a/spec/github-pages/integration_spec.rb b/spec/github-pages/integration_spec.rb index 4f881154..5bf8de31 100644 --- a/spec/github-pages/integration_spec.rb +++ b/spec/github-pages/integration_spec.rb @@ -258,7 +258,7 @@ def rm_destination context "jekyll-theme-primer" do it "sets the theme" do - expect(contents).to match("Theme: primer") + expect(contents).to match("Theme: jekyll-theme-primer") end it "uses the theme" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 12a4c4f4..bf8614da 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -29,15 +29,6 @@ def tmp_dir File.expand_path "../tmp", __dir__ end -def support_dir - File.expand_path "support", __dir__ -end - -def stub_request_for_remote_theme(repo:, revision:, filename:) - stub_request(:get, "https://codeload.github.com/#{repo}/zip/#{revision}"). - to_return(:status => 200, :body => File.binread(File.join(support_dir, filename)), :headers => {"Content-Type" => "archive/zip"}) -end - RSpec::Matchers.define :be_an_existing_file do match { |path| File.exist?(path) } end diff --git a/spec/support/merlot-0.2.0.zip b/spec/support/merlot-0.2.0.zip deleted file mode 100644 index 65e55d75..00000000 Binary files a/spec/support/merlot-0.2.0.zip and /dev/null differ diff --git a/spec/support/primer-0.6.0.zip b/spec/support/primer-0.6.0.zip deleted file mode 100644 index 24175919..00000000 Binary files a/spec/support/primer-0.6.0.zip and /dev/null differ