Why is my Jekyll build on GitHub pages failing?

#1

Hi,

I keep getting emails from GitHub pages complaining about symlinks causing build failures, when there are no symlinks where it complains there are, or anywhere in the repo… To top it off, Jekyll manages to build the site locally without a problem, so I cannot even try to debug the problem locally. If you’d like to check for symlinks yourself, or see if a solution you have in mind would likely apply, here is the repo: https://github.com/fusion809/fusion809.github.io.

I did—several commits ago, and in the old repo (I renamed the old repo as fusion809.github.io-old3 and created a fresh repo at the original location)—create a symlink I didn’t realize was forbidden. In the subsequent commit I removed it and since then I’ve been getting these errors. Here is the problem commit in the old repo: https://github.com/fusion809/fusion809.github.io-old3/commit/6ce5870ed390f3b4b43def08a545c8e48ba135e8. I made several efforts to fix the problem in this old copy before ditching it and starting a new repo, not a single attempt of mine has fixed this problem; it is getting maddening. I have even asked GitHub for help, over a week ago, with no reply (which to be clear, I’m not getting aggro at them over, I get they’re busy and they owe me nothing).

Here is the latest email I received reporting a build error:

The page build failed for the master branch with the following error:

A file was included in pages/governance/01-terminology.md that is a symlink or does not exist in your _includes directory. For more information, see …

For information on troubleshooting Jekyll see:

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

(the replacing links with ... was because this forum seems to have a problem with me adding any more than two links to this post).

Please tell me you good folks have a solution, that doesn’t involve switching to a new static site generator or loose the work I put into this website, as this is driving me mad.

Thanks for your time

#2

Github Pages only supports a limited number of gems, so I might first try to change your Gemfile to only include the github-pages gem (docs here).

#3

That failed—https://github.com/fusion809/fusion809.github.io/commits/master. Must admit, it didn’t surprise me given that I haven’t changed the Gemfile since I added and then removed that symlink before ditching the old repo.

#4

if you remove that page does it work?

if so then maybe your path is not correct. Like maybe it should be:
{% include_relative terminology/01-branches.md %}

#5

If you mean commenting it out, just tried it and it didn’t work. Same exact build error, oddly.

#6

Good word, I just moved the systems of gov file to _drafts and I’m still getting that exact same error. Also tried renaming it as a hidden file, yet still I receive this error.

#7

remove that whole page and see if you still get the error.

pages/governance/01-terminology.md

did you comment out all of the includes? I don’t think the path is correct, which is what the error is saying. Not sure though.

Is the error referencing the same page? not sure how that could be if you removed it.

#8

I commented it out of “Systems of government.md”, namely the line:

{% include_relative governance/01-terminology.md %}

which I commented out by changing it to:

<!--{% include_relative governance/01-terminology.md %}-->

and yes, it mentioned the exact same page after commenting it out. Deleting the file and the governance folder fixed the error. But, what is the correct path for these includes?

#9

It’s not like it’s easy to debug as I do not get errors building it locally.

#10

did you try my example above?

the file is already in a folder called governance, and then you are telling it to look in there for a folder also called governance, when really it should be looking in a folder called terminolgy which is in the governance folder.

And now you have it as:
{% include_relative governance/sysofgovsec/00-figure-1.md %}

try it as
{% include_relative sysofgovsec/00-figure-1.md %}

you are already in the governance folder, the direct path to where you want to go can’t reference that folder or else that would mean to look for a folder named governance inside the governance folder.

#11

Lol, started implementing your fixes, and while the original error seems to be abating, I’m now getting:

The page build failed for the master branch with the following error:

A file was included in pages/Systems that is a symlink or does not exist in your _includes directory. For more information, see https://help.github.com/en/articles/page-build-failed-file-is-a-symlink.

For information on troubleshooting Jekyll see:

https://help.github.com/articles/troubleshooting-jekyll-builds

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

#12

you might also try the path as:

/pages/governance/sysofgovsec/01-branches.md

with a leading / you are telling it to start at the root of the site and then follow.

not sure about that though, I don’t use include_relative so not 100% sure what it is expecting, but I am fairly certain this is just a path issue, not a symlink issue.

#13

that has to do with this file:

Systems of government.md which has spaces in which is not legal.

#14

After changing it to use _ instead of spaces I’m getting the error:

The page build failed for the master branch with the following error:

A file was included in pages/Systems_of_government.md that is a symlink or does not exist in your _includes directory. For more information, see https://help.github.com/en/articles/page-build-failed-file-is-a-symlink.

#15

I would stop moving the files around or renaming things as it is just making it more confusing. Focus on the path of the include_relative stuff.

I would remove them all and just add one at a time till you get it to work - not the files, just the code to include the different things. When you have 4 includes in one file, one of which is including 4 other files it is a little confusing to know which one is the problem - just do 1 until you can get the path correct and make sure that is the problem and then add the other stuff in.

#16

Seems I was wrong, as I tried removing governance/ from the include_relative path in 01-terminology, 02-systems-of-government.md and 03-organizational-structure.md and my local build fails, whinging that it cannot find the file. With governance/ in the file path it builds fine locally though. Likewise, using /pages/government/… also fails to build locally.

#17

OK, I’ll try combining all files into one; then go from there (As per your suggestion, if I understood you right).

#18

Builds now, the problem is that I broke it up for a reason, the insane size of the article and its sections make it untenable to have too much of it in the one file. I have no idea how to start including more manageably sized sections again without getting this error.

#19

not saying to combine them all into one, just to do one include_relative at a time so you can better tell where the problem is.

Maybe you should try collections, and break a collection into different files, then combine them on the output as needed.