【问题标题】:How to include files from another repo in Jekyll build?如何在 Jekyll 构建中包含来自另一个仓库的文件?
【发布时间】:2018-06-18 18:41:52
【问题描述】:

当我运行它时,来自复制的/first-repo 的文件更改将被bundle exec 忽略。如何确保包含来自/first-repo 的文件?

#!/bin/bash

cd /first-repo;
git pull;

cd /second-repo;
git pull;

# copy folder from first repo to second repo
cp -rf /first-repo /second-repo/destination_folder;

git add -A;
git commit -m "update destination folder from first repo";
git push;

# build 
bundle exec rake build_site;

【问题讨论】:

    标签: bash git jekyll


    【解决方案1】:

    听起来您可以使用Git Submodule

    继续该示例,在second-repo 中,您可以实例化first-repo 的git 子模块,以将整个first-repo 存储库作为second-repo 中的目录。您还可以使用Jekyll config include 变量指定first-repo 中的哪些文件在second-repo 中使用。

    【讨论】:

    • 如果你的 jekyll repo 是这个 repo 的子模块怎么办? git clone --recursive 如何处理循环?
    猜你喜欢
    • 2015-09-26
    • 2017-06-06
    • 1970-01-01
    • 1970-01-01
    • 2011-10-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多