2015-04-02 67 views
3

我想创建一个博客使用Jekyll在我的主要回购Github上的子目录。目前,我在www.jonbstrong.com着陆页/组合,并想在www.jonbstrong.com/blog如何在github子目录中托管Jekyll博客?

Jekyll quickstart guide的说明仅指创建哲基尔博客,当你想要安装的博客在主回购协议。

+0

我在这里没有看到实际的问题。你能否详细说明你在问什么,以及你尝试过哪些不起作用? – CodeMoose 2015-04-02 20:53:48

+2

我在问:如何在github子目录中安装jekyll博客? – jonbstrong 2015-04-02 21:27:38

回答

1

只需创建一个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 

完成。

+0

我创建了一个博客存储库并在那里创建了一个jekyll博客,但是我不确定如何使用我们的页面而不是主页,而且我无法使用www.jonbstrong.com/blog地址访问它。这里是我使用的命令的完整列表: jekyll new myblog | cd myblog |杰基尔服务| git init | git add -A | git commit -m“第一次提交”| git remote add origin | https://github.com/jonbstrong/blog.git | git push -u origin master' – jonbstrong 2015-04-03 18:12:15

+0

非常感谢您的帮助!不过,我现在在http://jonbstrong.com/blog/上看到了一些相当奇怪的布局,似乎jekyll安装缺少样式或出现了问题..您的'_config.yml'中的 – jonbstrong 2015-04-03 19:23:16

+1

,您必须设置'baseurl:“/ blog”' – 2015-04-03 20:14:52

相关问题