在本地构建jekyll网站并将其推送到github页面 [英] Locally building and pushing jekyll site to github pages

查看:40
本文介绍了在本地构建jekyll网站并将其推送到github页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站上使用宝石"jekyll-assets",当推送到github页面时,它失败了.我读过一种解决方法是在本地构建站点,该站点构建得很好,然后将其推送到github页面.但是,执行此操作的人员的示例正在使用项目存储库,并将站点推送到"gh-pages"分支.我正在为自己做这个网站,为此设置建议使用repo .github.io下的master分支.如何通过此设置将本地的jekyl构建推送到站点?

I am using the gem "jekyll-assets" on my site and it fails when pushing to github pages. I have read that a way around this is to build the site locally, which builds just fine, and then push it to github pages. The examples of people doing this, however, are using a project repository and they are pushing the site to a "gh-pages" branch. I am doing this site for myself and the setup for this suggests using the master branch under the repo .github.io. How do I push a local jekyl build to a site with this setup?

推荐答案

您只需要推送_site文件夹的内容.没有别的了,文件夹本身也没有.

You need to push only the content of the _site folder. Nothing else, nor the folder itself.

如果要设置项目站点,则将内容推送到gh-pages分支.如果这是您的用户网站,则该回购协议必须命名为username.github.io,并且您的网站根目录必须是master分支.

If you are setting up a project site, push the content to the gh-pages branch. If it's your user website, the repo must be named username.github.io and your site root needs to be the master branch.

让我知道进展如何! :)

Let me know how it goes! :)

希望能有所帮助!

这篇关于在本地构建jekyll网站并将其推送到github页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆