Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jekyll page build failure

I'm new to web development, so please bear with me.

I'm trying to create a website for a group project using Github Pages, and I have forked this repository. I've made several changes, and the website was up and running. Today I updated some images and the website wouldn't build anymore. I tried reverting to the previous commit, but it wouldn't build either. I read the troubleshooting page, to no avail. I don't have any idea of what to do anymore, please help.

the error:

The page build failed with the following error:

Page build failed. For more information, see help[dot]github.com/articles/troubleshooting-github-pages-build-failures.

For information on troubleshooting Jekyll see:

help[dot]github.com/articles/troubleshooting-jekyll-builds

If you have any questions you can contact us by replying to this email.

I'm using the web interface of github (not ideal, I know). the repository is here.

like image 434
bruno cuconato Avatar asked Oct 21 '16 12:10

bruno cuconato


People also ask

Can I use GitHub Pages without Jekyll?

If you publish your site from a source branch, GitHub Pages will use Jekyll to build your site by default. If you want to use a static site generator other than Jekyll, we recommend that you write a GitHub Actions to build and publish your site instead.

How do I see GitHub errors?

If you are publishing from a branch, when you create a pull request to update your publishing source on GitHub, you can see build error messages on the Checks tab of the pull request. For more information, see "About status checks."

What is Nojekyll?

nojekyll . The existence of this file tells GitHub Pages not to run the published files through Jekyll. This is important since Jekyll will discard any files that begin with _ . By default, Antora puts the UI files in a directory named _ , which Jekyll then erases.

Is GitHub Pages Free?

GitHub Pages is just the solution to that problem. It's free. You can host your website, including custom domain names(https://dhrumil.xyz), 404 error page, sub-domain (https://blog.dhrumil.xyz) and all over secure https.


3 Answers

The problem was caused by a GitHub server outage, not a problem in my code.

Anyone can check over at the github status website if their server is down. If it is, there isn't much you can do except wait until it is back up again...

like image 136
bruno cuconato Avatar answered Sep 28 '22 10:09

bruno cuconato


The same error occured for me. But it wasn't caused by the Github server issue neither by me. If you are not using jekyll to build,then the issue was sometimes GitHub pages will mistake certain characters, specifically curly braces, as jekyll objects, tags, etc. causing your page build to fail.The solution is to create an empty file .nojekyll in your root folder.

And build it again. It solved mine. Hope it helps someone.

like image 33
Surya Avatar answered Sep 28 '22 10:09

Surya


I just ran into this same issue and I'd never even heard of jekyll and wasn't trying to use it. Apparently it's included in github.io by default, and it "Transforms your plain text into static websites and blogs" (reference).

After reading a number of these answers and visiting the linked doc about front matter, I realized what went wrong. I had a text file in my project folder with a "to do" list, and the top of the file started with:

---
TO DO
---

and that formatting (3 dashes & line break, text & line break, 3 dashes) just happened to correlate to the jekyll/YAML "front matter block", but TO DO wasn't valid data, so it failed.

So there are two different solutions that work:

  1. Change the formatting in the text file to be more than 3 dashes in a row.
  2. According to this link, you can "disable the Jekyll build process by creating an empty file called .nojekyll in the root of your publishing source".

The second option is better because you won't accidentally run into this issue again.

Also, if it isn't working, make sure the .nojekyll file is in your root folder. I had mine in username.github.io/mywebsite/ (which was the root of my website I was publishing), but that didn't work. It has to be in the root of your github project (in your username.github.io folder).

like image 33
gamingexpert13 Avatar answered Sep 28 '22 10:09

gamingexpert13