Jekyll Config Multiple Files

后端 未结 3 1110
既然无缘
既然无缘 2021-01-18 21:38

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

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

Instead, I receive:

         


        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-18 22:26

    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 
    

提交回复
热议问题