简体   繁体   English

GitHub页面和jekyll部署无法正常工作

[英]GitHub pages and jekyll deploy not working properly

My jekyll blog is running ok in my pc but when I open it from my gh repository it's broken. 我的jekyll博客在我的电脑上运行正常但是当我从我的gh存储库中打开它时它已经坏了。 Here's a screen of that 这是一个屏幕

在此输入图像描述

If I click on one of the links, that next page throws 404 . 如果我点击其中一个链接,则下一页会抛出404 Needless to say, I followed the steps from the gh site in order to configure it properly. 不用说,我按照gh站点的步骤进行了正确配置。

baseurl is set, the paths to css and images are correctly set using {{ site.baseurl }} . 设置了baseurl ,使用{{ site.baseurl }}正确设置了cssimages的路径。 So locally the blog works fine, but still, on gh-pages it's not. 所以本地博客工作正常,但仍然,在gh-pages它不是。

Code is here 代码就在这里

Another piece of information. 另一条信息。 I have a master branch and a gh-pages branch, the one updated is gh-pages , master has old code, is it ok? 我有一个master分支和一个gh-pages分支,一个更新的是gh-pages ,master有旧代码,可以吗?

Any ideas please? 有什么想法吗?

It works ! 有用 ! What you saw was an old version of your site. 您看到的是您网站的旧版本。

Two possible explanations : 两种可能的解释:

  • as @goyllo says : browser cache f5 or Ctrl+r can help. 正如@goyllo所说:浏览器缓存f5Ctrl+r可以提供帮助。
  • Github pages is serving the old version and the new site generation is still pending. Github页面服务于旧版本,新网站生成仍处于待定状态。

In order to know if you last commit has been published it to go to https://github.com/goblind/modestoRimba/settings and to watch under GitHub Pages box. 为了知道您上次提交是否已发布,请转至https://github.com/goblind/modestoRimba/settings并在GitHub页面框下观看。

If you see Your site is ready to be published at http://goblind.github.io/modestoRimba , your site generation is pending. 如果您看到Your site is ready to be published at http://goblind.github.io/modestoRimba ,那么您的站点生成正在等待处理。

If you see Your site is published at http://goblind.github.io/modestoRimba , your site have been published with last commit. 如果您看到Your site is published at http://goblind.github.io/modestoRimba ,那么您的网站已经发布了上次提交。

It's working fine in my browser. 它在我的浏览器中运行良好。 I want to say one thing, GitHub pages cache your old resources(including HTML, CSS, JS, Images), in browser for better UX, For example, just disconnect your internet, and reload that page again, and it will be work fine, similarly if you visit another page, then it will not load your CSS, or javascript again from your website, they will load directly from browser cache. 我想说一件事,GitHub页面缓存您的旧资源(包括HTML,CSS,JS,图像),在浏览器中获得更好的用户体验,例如,只需断开您的互联网,然后重新加载该页面,它将正常工作同样,如果您访问另一个页面,那么它将不会从您的网站加载您的CSS或javascript,它们将直接从浏览器缓存加载 So you are getting this error because your browser use old cache resource, and it will update again in few hour, depending on cache time. 因此,您收到此错误是因为您的浏览器使用旧的缓存资源,并且它会在几小时后再次更新,具体取决于缓存时间。

I want to say, if your blog working fine in localhost, then don't worry, it will be also work fine in github pages as well, otherwise github will send you notice in your email regarding page build fail. 我想说,如果你的博客在localhost中工作正常,那么不用担心,它也可以在github页面中正常工作,否则github会在你的电子邮件中发送关于页面构建失败的通知。

在你的_config.yml baseurl:/ modesto r imba R应该是大写的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM