How to permanently set JEKYLL_ENV=production for Jekyll build?

孤街浪徒 提交于 2019-12-25 01:35:03

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!