Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ignore some environments #25

Closed
doktorbro opened this issue Dec 9, 2014 · 6 comments · Fixed by #26
Closed

Ignore some environments #25

doktorbro opened this issue Dec 9, 2014 · 6 comments · Fixed by #26

Comments

@doktorbro
Copy link
Collaborator

ignore:
  envs: [development]

See jekyll/jekyll#2417

doktorbro pushed a commit that referenced this issue Dec 12, 2014
doktorbro pushed a commit that referenced this issue Dec 12, 2014
Ignore environments. Closes #25
@doktorbro
Copy link
Collaborator Author

Dear friends of fast Jekyll websites, the latest version of the compress layout allows to ignore it in some environments. You can use it since Jekyll 2.1.

Example

So you do not want to compress the HTML while developing the website on your local machine.

  1. Set the environment variable ENV["JEKYLL_ENV"] to local.
  2. Set the same string in the configuration file (_config.yml):
compress_html:
  ignore:
    envs: [local]

Of course you can define multiple environments to ignore.

⚠️ If the ENV["JEKYLL_ENV"] is empty, then the current env is development.


Thank you for making the web faster:

@bbBobbyEarl, @kleinfreund, @pbfy0, @TuckerWhitehouse, @robinpoort, @dhutchison, @seabre, @Phlow, @freecates, @parkr

@TuckerWhitehouse
Copy link

@penibelst I don't think you meant to include me in your thank you... :)

@doktorbro
Copy link
Collaborator Author

@TuckerWhitehouse I included you, because you compress several websites with my layout.

@kleinfreund
Copy link

@penibelst Testing this right now. I've set the environment variable on the user level here (Windows 7), but echo $ENV["JEKYLL_ENV"] prints [JEKYLL_ENV] not local. Not sure if one has to use a different syntax here.

@kleinfreund
Copy link

Well, was missing the obvious here.

Setting the Jekyll environment variable on Windows works with JEKYLL_ENV set to local.

It works like a charm. Very nice, @penibelst.

@doktorbro
Copy link
Collaborator Author

@kleinfreund Glad to hear it works on your machine.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants