Github pages are not updating

早过忘川 提交于 2019-11-28 16:56:09
Sebastian Carroll

For others, also check the dates of your posts. I just had this problem. I'm at UTC+11 and I'm pretty sure the server is at UTC. Thus if I date my posts with my local time, the server thinks they are in the future and won't build them. Using UTC avoided this for me.

As mentioned by joao cenoura in the comments below:

  • you can tell jekyll to show "future" posts by adding future: true to your _config.yml
  • and/or add timezone: TIMEZONE to specify your timezone.

See https://jekyllrb.com/docs/configuration/ for more info.

Nothing of this solved for me. The solution was to edit the index.html file into github website.

Go to your index.html file through your site (example.github.io/index.html) and then reload the page. Then you can go back to (example.github.io) and it should have updated. You can do the same with the master.css file or etc. If it doesn't work try reloading (github.com/example/example.github.io/[blob/master/]index.html) instead and it will have updated.

For future people finding this: I had an empty CNAME file. Check that if you're having a similar issue.

I had the problem of having an unverified email. The update worked for the first time but failed after that. A verified email is needed to trigger github pages build. Also a deploy key cannot be used for this, as it won't trigger a build.

Source: https://help.github.com/articles/troubleshooting-github-pages-build-failures/

In my case, none of above solutions works. Finally I find out the reason is: there is "relative_permalinks" option in my _config.yml. This option is recently deprecated in Jekyll 3.0.

Refer to: https://help.github.com/articles/removing-relative-permalinks/

I had an unclosed <a> tag which caused the build to be pending forever. Fixing that solved the issue. Makes sense that GitHub would verify your links.

In my case, it happened to be that I mentioned a relative path to refer to an image, something like - ./test.png Seems that it's not allowed, may be a security issue or what. Whatever, if you've done something like that, remove it and refer to it as test.png

For me, I just waited ~5 mins, and it was updated

If someone has made the branch gh-pages from scratch (manually) the problem is that you need a file call params.json to make it work.

I don't have this params.json file, but it still work...

I know this might sound simple but make certain you are on the right branch and in the right file. In my case I made a gh-pages and tried to commit from my local repo on the master branch . Also I was updating my filename instead of index.html. These were my errors. I had to switch to gh-pages branch and update in index.html commit, push and then everything worked fine.

Please refer to the Jerkyll troubleshooting website, as there are multiple error sources: https://help.github.com/articles/troubleshooting-jekyll-builds/

In my case a german Umlaut ("ö") in a markdown file caused the problem.

In my case, after trial and error on some solutions here, what fixed it was adding the encoding to the _config file like this

encoding: UTF-8

More troubleshooting options here

For me it was an issue with not properly having a .gitmodules file. I was able to troubleshoot in the settings tab of my repo, under the GitHub pages section, which indicates build issues and was helpful for troubleshooting.

Well, I got to the end and nothing had worked for me, so I will share with you what I did to get mine to work. Oddly (and simply) enough I created a new branch, made that branch the "default" branch and pushed from there.This worked for me and I hope it does for someone who makes it to the bottom and still hasn't found an answer, haha.

I know that this is just adding to the long-tail list of solutions, but in my case, I forgot to define kramdown in _config.yaml

# Build settings
markdown: kramdown

This was caused when I was converting from a theme without to a theme with the kramdown requirement.

In the repository settings, make sure the Github Pages is currently being built from the gh-pages branch

I had this fault today with a static page - the cause was actually a service failure at GitHub Pages itself. You can check for service messages at https://status.github.com/messages.

In my case the problem was because of my repository was private. After I made it public, the problem has gone. The weird part of story is that I was able to create private repository and use GH pages with it. I did it in accordance with official guide (http://take.ms/p2SS7). It worked fine for about 9 commits, but on 10-th it became broken.

Roberto Fernandez Diaz

If someone has made the branch gh-pages from scratch (manually) the problem is that you need a file call params.json to make it work.

This is an example of that file :

{
  "name": "nameOfProyect",
  "tagline": "name of proyect",
  "body": "### Welcome to GitHub Pages.\r\nThis automatic page generator is the easiest way to create beautiful pages for all of your projects. Author your page content here using GitHub Flavored Markdown, select a template crafted by a designer, and publish. After your page is generated, you can check out the new branch:\r\n\r\n```\r\n$ cd your_repo_root\/repo_name\r\n$ git fetch origin\r\n$ git checkout gh-pages\r\n```\r\n\r\nIf you're using the GitHub for Mac, simply sync your repository and you'll see the new branch.\r\n\r\n### Designer Templates\r\nWe've crafted some handsome templates for you to use. Go ahead and continue to layouts to browse through them. You can easily go back to edit your page before publishing. After publishing your page, you can revisit the page generator and switch to another theme. Your Page content will be preserved if it remained markdown format.\r\n\r\n### Rather Drive Stick?\r\nIf you prefer to not use the automatic generator, push a branch named `gh-pages` to your repository to create a page manually. In addition to supporting regular HTML content, GitHub Pages support Jekyll, a simple, blog aware static site generator written by our own Tom Preston-Werner. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers intelligent blog support and other advanced templating features.\r\n\r\n### Authors and Contributors\r\nYou can @mention a GitHub username to generate a link to their profile. The resulting `<a>` element will link to the contributor's GitHub Profile. For example: In 2007, Chris Wanstrath (@defunkt), PJ Hyett (@pjhyett), and Tom Preston-Werner (@mojombo) founded GitHub.\r\n\r\n### Support or Contact\r\nHaving trouble with Pages? Check out the documentation at https:\/\/help.github.com\/pages or contact support@github.com and we\u2019ll help you sort it out.\r\n",
  "google": "",
  "note": "Don't delete this file! It's used internally to help with page regeneration."
}

In my case it was incorrect kramdown syntax. My code was

  {% highlight %}
  lorem lipsum
 {% endhighlight %}

apparently you must tell kramdown the language

  {% highlight html %}
  lorem lipsum
 {% endhighlight %}

My Github Pages was turned off under the Settings tab of the repo.

I don't remember turning it off, but there it was, and turning it back on was the fix.

Adding my two cents: in my case there were two problems (one "pebcak" and then a more valid one).

I had two email addresses set up in GitHub and I was checking the non-primary email for build error messages (to manage emails: log in to GitHub, click on user menu on the top right, select Settings and then "Emails" from the left menu -build error messages will arrive at the primary email set).

Once I got to see the error messages I found out I had added a description including a ":" character in my _config.yaml and since this is the character used to separate key,value pairs, it was preventing the site to build.

In my case, I had another file with the same permalink to the page that was not refreshing the content. Pay attention to that.

I had the same issue, but in my case CNAME contained correct domain name. I think problem had something to do with repository renaming I did before... Online name was different from local, although there were no issues on pushing and online files got updated - live version did not. After deleting repository from local machine and cloning it from GitHub again problem got solved.

To my mind, github pages is late from one commit. This means if you wan't it to refresh, add any modification to your source, commit and push.

This behavior only apply for gh-pages branch and any.github.io repository. In the "docs" folder, the modifications apply direcly.

In my case, my problem was after git push my GitHub file was updating but not showing my website on GitHub pages.

Note: I was creating Website by React

Also on HTML project, I faced the same problem, in that case, I just did first of all git pull and then git status | git add . | git commit -m"adding some content" | and git push it worked for me.

But In React project, It didn't work. I run this again on my cmd npm run deploy then my React web app is showing on GitHub pages.

My Suggestion is to try everything showing on this post comments. Because the solution to this problem is not one.

In my case I left empty param url in _config.yaml. After I've specified url: example.github.io everything started to work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!