diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 71c243a7..f12914bf 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,25 +4,7 @@ Hi there! We're glad you're interested in contributing to the GitHub Pages Gem. ## Where to get help or report an issue -### Bugs - -* If your think you may have found a bug in a particular theme or plugin, please open an issue against that project's repository directly. - -* If your think you may have found a bug in Jekyll itself, please [open an issue in the Jekyll repository](https://github.com/jekyll/jekyll/issues/new). - -* If you think you may have found a bug with how the GitHub Pages Gem bootstraps your local development environment, please [open an issue in this repository](https://github.com/github/pages-gem/issues/new). - -### Questions - -If you have a general question about Jekyll or GitHub Pages (e.g., a configuration question, a question specific to your site, upgrading, etc.) you have two options: - -1. [Contact GitHub Support](https://github.com/contact?form%5Bsubject%5D=GitHub%20Pages), or - -2. Ask your question of the Jekyll community on [talk.jekyllrb.com](https://talk.jekyllrb.com/) - -### Feature requests - -General GitHub Pages feature requests, including requests to add additional plugins or themes should be made via [GitHub Support](https://github.com/contact?form%5Bsubject%5D=GitHub%20Pages%20Feature%20Request). +See [the support guidelines](SUPPORT.md) ## Contributing diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 4607af1d..39a6ffa3 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,6 +1,6 @@ ### Before submitting an issue, please be sure to -- [ ] Read [the contributing instructions](https://github.com/github/pages-gem/blob/master/CONTRIBUTING.md#contributing-to-the-github-pages-gem) +- [ ] Read [the contributing instructions](https://github.com/github/pages-gem/blob/master/.github/CONTRIBUTING.md#contributing-to-the-github-pages-gem) - [ ] Update to the latest Gem version (run `bundle update github-pages`) ### This issue affects @@ -8,7 +8,7 @@ - [ ] The site generated by GitHub Pages - [ ] Building sites locally -*The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting [seeking support in other forums](https://github.com/github/pages-gem/blob/master/CONTRIBUTING.md#where-to-get-help-or-report-an-issue).* +*The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting [seeking support in other forums](https://github.com/github/pages-gem/blob/master/.github/CONTRIBUTING.md#where-to-get-help-or-report-an-issue).* ### What did you do (e.g., steps to reproduce) diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md new file mode 100644 index 00000000..cc3db37a --- /dev/null +++ b/.github/SUPPORT.md @@ -0,0 +1,21 @@ +## Where to get help or report an issue + +### Bugs + +* If your think you may have found a bug in a particular theme or plugin, please open an issue against that project's repository directly. + +* If your think you may have found a bug in Jekyll itself, please [open an issue in the Jekyll repository](https://github.com/jekyll/jekyll/issues/new). + +* If you think you may have found a bug with how the GitHub Pages Gem bootstraps your local development environment, please [open an issue in this repository](https://github.com/github/pages-gem/issues/new). + +### Questions + +If you have a general question about Jekyll or GitHub Pages (e.g., a configuration question, a question specific to your site, upgrading, etc.) you have two options: + +1. [Contact GitHub Support](https://github.com/contact?form%5Bsubject%5D=GitHub%20Pages), or + +2. Ask your question of the Jekyll community on [talk.jekyllrb.com](https://talk.jekyllrb.com/) + +### Feature requests + +General GitHub Pages feature requests, including requests to add additional plugins or themes should be made via [GitHub Support](https://github.com/contact?form%5Bsubject%5D=GitHub%20Pages%20Feature%20Request). diff --git a/lib/github-pages/configuration.rb b/lib/github-pages/configuration.rb index ddcd0668..fa38a159 100644 --- a/lib/github-pages/configuration.rb +++ b/lib/github-pages/configuration.rb @@ -24,11 +24,12 @@ class Configuration }, }.freeze - # Jekyll defaults merged with Pages defaults. - MERGED_DEFAULTS = Jekyll::Utils.deep_merge_hashes( - Jekyll::Configuration::DEFAULTS, - DEFAULTS - ).freeze + # User-overwritable defaults used only in production for practical reasons + PRODUCTION_DEFAULTS = Jekyll::Utils.deep_merge_hashes DEFAULTS, { + "sass" => { + "style" => "compressed", + }, + }.freeze # Options which GitHub Pages sets, regardless of the user-specified value # @@ -82,6 +83,11 @@ def development? Jekyll.env == "development" end + def defaults_for_env + defaults = development? ? DEFAULTS : PRODUCTION_DEFAULTS + Jekyll::Utils.deep_merge_hashes Jekyll::Configuration::DEFAULTS, defaults + end + # Given a user's config, determines the effective configuration by building a user # configuration sandwhich with our overrides overriding the user's specified # values which themselves override our defaults. @@ -91,7 +97,7 @@ def development? # Note: this is a highly modified version of Jekyll#configuration def effective_config(user_config) # Merge user config into defaults - config = Jekyll::Utils.deep_merge_hashes(MERGED_DEFAULTS, user_config) + config = Jekyll::Utils.deep_merge_hashes(defaults_for_env, user_config) .fix_common_issues .add_default_collections diff --git a/lib/github-pages/dependencies.rb b/lib/github-pages/dependencies.rb index 0542d284..a75f115c 100644 --- a/lib/github-pages/dependencies.rb +++ b/lib/github-pages/dependencies.rb @@ -7,7 +7,7 @@ module GitHubPages class Dependencies VERSIONS = { # Jekyll - "jekyll" => "3.4.3", + "jekyll" => "3.4.5", "jekyll-sass-converter" => "1.5.0", # Converters @@ -17,7 +17,7 @@ class Dependencies # Misc "liquid" => "3.0.6", "rouge" => "1.11.1", - "github-pages-health-check" => "1.3.4", + "github-pages-health-check" => "1.3.5", # Plugins "jekyll-redirect-from" => "0.12.1", @@ -27,14 +27,14 @@ class Dependencies "jekyll-paginate" => "1.1.0", "jekyll-coffeescript" => "1.0.1", "jekyll-seo-tag" => "2.2.3", - "jekyll-github-metadata" => "2.4.0", + "jekyll-github-metadata" => "2.5.1", "jekyll-avatar" => "0.4.2", # Plugins to match GitHub.com Markdown "jemoji" => "0.8.0", "jekyll-mentions" => "1.2.0", "jekyll-relative-links" => "0.4.1", - "jekyll-optional-front-matter" => "0.1.2", + "jekyll-optional-front-matter" => "0.2.0", "jekyll-readme-index" => "0.1.0", "jekyll-default-layout" => "0.1.4", "jekyll-titles-from-headings" => "0.2.0", diff --git a/lib/github-pages/plugins.rb b/lib/github-pages/plugins.rb index fd6a95ee..21b4daeb 100644 --- a/lib/github-pages/plugins.rb +++ b/lib/github-pages/plugins.rb @@ -46,7 +46,7 @@ class Plugins THEMES = { "minima" => "2.1.1", "jekyll-swiss" => "0.4.0", - "jekyll-theme-primer" => "0.2.1", + "jekyll-theme-primer" => "0.3.1", "jekyll-theme-architect" => "0.0.4", "jekyll-theme-cayman" => "0.0.4", "jekyll-theme-dinky" => "0.0.4", diff --git a/lib/github-pages/version.rb b/lib/github-pages/version.rb index ebb57986..2ad0504d 100644 --- a/lib/github-pages/version.rb +++ b/lib/github-pages/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module GitHubPages - VERSION = 141 + VERSION = 146 .to_s + '-siteleaf'.freeze end diff --git a/spec/github-pages/configuration_spec.rb b/spec/github-pages/configuration_spec.rb index 060a7319..72c9dcdc 100644 --- a/spec/github-pages/configuration_spec.rb +++ b/spec/github-pages/configuration_spec.rb @@ -14,6 +14,8 @@ let(:configuration) { Jekyll.configuration(test_config) } let(:site) { Jekyll::Site.new(configuration) } let(:effective_config) { described_class.effective_config(site.config) } + let(:defaults_for_env) { described_class.defaults_for_env } + before(:each) do ENV.delete("DISABLE_WHITELIST") ENV["JEKYLL_ENV"] = "test" @@ -55,6 +57,15 @@ it "accepts local configs" do expect(effective_config["testing"]).to eql("123") end + + context "in development" do + before { ENV["JEKYLL_ENV"] = "development" } + + it "doesn't compress sass" do + expect(effective_config["sass"]).to be_nil + expect(defaults_for_env["sass"]).to be_nil + end + end end context "#set being called via the hook" do @@ -159,6 +170,11 @@ expect(described_class.disable_whitelist?).to eql(false) end end + + it "compresses sass" do + expect(effective_config["sass"]).to eql("style" => "compressed") + expect(defaults_for_env["sass"]).to eql("style" => "compressed") + end end end end