Jekyll Config Multiple Files

余生长醉 提交于 2019-12-23 12:26:20

问题


As the doc mentions, we should be able to write:

jekyll build --config "_config.yml, _config.en.yml"

Instead, I receive:

Fatal: The configuration file ' _config.en.yml' could not be found.

While the file actually exists.

What am I doing wrong?


回答1:


It's a comma-separated list. You're separating it with a comma and a space.




回答2:


Remove the space after the coma.

jekyll build --config "_config.yml,_config.en.yml"



回答3:


For others coming here and not finding the answer they need:

It could also be that you are running the build script from another folder where the config files are (like a git post-receive hook)

In which case you'd need to do tweak the example scripts to include the $CONFIG as follow:

TMP_GIT_CLONE=$HOME/tmp_git/your_domain
GEMFILE=$TMP_GIT_CLONE/Gemfile  
PUBLIC_WWW=/var/www/html/your_domain
CONFIG=$TMP_GIT_CLONE/_config.yml,$TMP_GIT_CLONE/_config_dev.yml  
git clone $GIT_REPO $TMP_GIT_CLONE
BUNDLE_GEMFILE=$GEMFILE bundle install
BUNDLE_GEMFILE=$GEMFILE bundle exec jekyll build -s $TMP_GIT_CLONE -d $PUBLIC_WWW --config $CONFIG 


来源:https://stackoverflow.com/questions/30897871/jekyll-config-multiple-files

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