Add shortcut for all ignoring environments

pull/98/head
Kryštof Korb 4 years ago
parent 13b7194b97
commit 5d6b0de193
  1. 2
      src/compress.liquid
  2. 3
      test/_config_ignore_all.yml
  3. 7
      test/test_filter.rb

@ -1,6 +1,6 @@
{% endcapture %}
{% if site.compress_html.ignore.envs contains jekyll.environment %}
{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}
{{ content }}
{% else %}

@ -0,0 +1,3 @@
compress_html:
ignore:
envs: all

@ -50,6 +50,13 @@ class TestCompressed < Minitest::Test
ENV["JEKYLL_ENV"] = nil
end
def test_ignore_all
ENV["JEKYLL_ENV"] = "production"
jekyll_build ["_config.yml", "_config_ignore_all.yml"]
assert_dir "ignore"
ENV["JEKYLL_ENV"] = nil
end
def test_startings
jekyll_build ["_config.yml", "_startings.yml"]
assert_dir "startings"

Loading…
Cancel
Save