问题
Is there some way to set the JEKYLL_ENV=production
flag permanently?
In the Jekyll Build Command Options documentation, it says that to build in production
mode versus development
mode, one has to run the build command with the JEKYLL_ENV
flag, like so:
JEKYLL_ENV=production jekyll build
I've already tried adding JEKYLL_ENV=production
and env: production
, as well as using an .env
file.
Update
Tested and working solution:
echo 'export JEKYLL_ENV=production' >> ~/.bashrc | # add to ~/.bashrc
source ~/.bashrc # reload ~/.bashrc
回答1:
try to add this line in your .bashrc
export JEKYLL_ENV=production
来源:https://stackoverflow.com/questions/51129261/how-to-permanently-set-jekyll-env-production-for-jekyll-build