New issue

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

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

Already on GitHub? Sign in to your account

feature: in development mode, do not compress HTML #336

Merged
merged 3 commits into from Jan 29, 2019

Conversation

Projects
None yet
2 participants
@sylvainmetayer
Copy link
Contributor

sylvainmetayer commented Nov 19, 2018

Useful for development purpose

sylvainmetayer added some commits Nov 19, 2018

feature: in development mode, do not compress HTML
Useful for development purpose
feat: add vendor to gitignore
This allow users who don't want to globally install gems to install them locally
without being versionned.

@mehmandarov mehmandarov requested a review from jehartzog Dec 1, 2018

@sergiokopplin

This comment has been minimized.

Copy link
Owner

sergiokopplin commented Jan 29, 2019

I didn't notice any difference using bundle exec jekyll serve --config _config.yml,_config-dev.yml.
How can i test this @sylvainmetayer?

@sylvainmetayer

This comment has been minimized.

Copy link
Contributor Author

sylvainmetayer commented Jan 29, 2019

The compress_html should allow to define environments where the compress layout is not used, so the HTML is not minified (which can be easier to debug).

But in production (i.e when hosting on github page), it will be minified.

To test it, you can do the following with each environment : curl http://localhost:4000

  • With a server running with the development configuration (bundle exec jekyll serve --config _config.yml,_config-dev.yml)
  • With a server running with the production version (JEKYLL_ENV=production bundle exec jekyll serve --config _config.yml)

The JEKYLL_ENV variable is defined by default to development (https://jekyllrb.com/docs/configuration/environments/) and when building on github page, Github set this variable to production.

@sergiokopplin

This comment has been minimized.

Copy link
Owner

sergiokopplin commented Jan 29, 2019

got it. i think i've testes the wrong way! merging

@sergiokopplin sergiokopplin merged commit c950d72 into sergiokopplin:gh-pages Jan 29, 2019

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment