GitHub pages are not updating

后端 未结 30 2305
[愿得一人]
[愿得一人] 2020-12-04 15:22

I\'m running into a weird issue with GitHub pages. I pushed a new commit to my personal pages page maltzj.github.io, but the new article isn\'t showing up there. When I exec

相关标签:
30条回答
  • 2020-12-04 15:24

    In my case, it happened to be that I mentioned a relative path to refer to an image, something like - ./test.png.

    It seems that it's not allowed, and it may be a security issue or what. Whatever, if you've done something like that, remove it and refer to it as test.png.

    0 讨论(0)
  • 2020-12-04 15:24

    For me it was an issue with not properly having a .gitmodules file.

    I was able to troubleshoot in the settings tab of my repository, under the GitHub pages section, which indicates build issues and was helpful for troubleshooting.

    0 讨论(0)
  • 2020-12-04 15:24

    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.

    0 讨论(0)
  • 2020-12-04 15:25

    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.

    0 讨论(0)
  • 2020-12-04 15:25

    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."
    }
    
    0 讨论(0)
  • 2020-12-04 15:26

    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.

    0 讨论(0)
提交回复
热议问题