Closed Barsonax closed 5 years ago
Ah, apologies, I wrote the instructions and ran them on my Mac only. I guess this is not how Windows machines set environment variables.
I don't think you can set an environment variable inline like this on Windows. You could look into setting the JEKYLL_ENV
variable using the set
command and then run bundle exec jekyll build
after.
If you are able to get through this, I'd really appreciate a pull request that updates the Usage section with your experiences so that this gem can better support Windows developers too.
Already tried that but it seems jekyll is not fooled by that :)
Do any of the windows instructions in this blog post help?
Tried it:
But when I run bundle exec jekyll build
I don't see any gzip files.
Where are you looking for the gzipped files?
In the _site folder. I only see html, css etc files there.
Have you added jekyll-gzip
to the plugins
array in your _config.yml
?
(I didn’t think this was necessary, but maybe it is and I’ll need to update the instructions.)
No I haven't done that yet. I only added it to the gemfile like the instructions said.
Ah, give that a go and let me know if it helps. Then I’ll update the Readme.
Was this the solution? Would love to get it into the README if that's what I was missing.
Haven't had the time yet to check.
Ok, let me know when you do! Thanks!
I still don't see any gzip's
EDIT: argh forgot to hit the save in vs code. Now I do see the gzip files
Is it normal the normal assets are still there?
To summarize:
jekyll-gzip
to your plugins
node in _config.yml
gem 'jekyll-gzip'
to your Gemfile
bundle install
JEKYLL_ENV
environment variable and set the value to production
bundle exec jekyll build
_site
folderHooray!
It is normal that the regular assets remain, if a user agent requests the asset but doesn't say that it will accept gzip as an encoding we want to be able to serve the original asset.
I will try to write up the extra instructions around environment variables for Windows. I have already added the bit about adding to the plugins
section in _config.yml
.
Thanks for working through this with me!
When working through Usage I noticed that the following command does not work:
Iam running this on windows.