我想在Github的主repo的子目录上使用Jekyll创建一个博客。目前,我在www.jonbstrong.com上有一个着陆页/作品集,希望在
www.jonbstrong.com/blog
上创建Jekyll博客。
Jekyll快速入门指南上的说明只涉及当您想要将博客安装在主repo中时。www.jonbstrong.com/blog
上创建Jekyll博客。
Jekyll快速入门指南上的说明只涉及当您想要将博客安装在主repo中时。blog
存储库并将您的 Jekyll 文件发送到其中(gh-pages 分支)。然后,您将能够访问 www.jonbstrong.com/blog。master
分支中。任何其他存储库,例如 username.github.io/repositoryName,都会发布在 gh-pages
分支中。git checkout -b gh-pages
git add -A
git commit -m "first commit in gh-pages branch"
git push origin gh-pages
完成。
_config.yml
文件中,你需要设置 baseurl: "/blog"
。 - David Jacquel