Why is my Jekyll build on GitHub pages failing?

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: GitHub - fusion809/fusion809.github.io: Franklin-powered website..

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: sysgov: html->md, using markdownify to properly render later md · fusion809/fusion809.github.io-old3@6ce5870 · GitHub. 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

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).

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.

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 %}

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

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.

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.

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?

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

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.

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 Troubleshooting Jekyll build errors for GitHub Pages sites - GitHub Docs.

For information on troubleshooting Jekyll see:

Troubleshooting Jekyll build errors for GitHub Pages sites - GitHub Docs

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

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.

that has to do with this file:

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

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 Troubleshooting Jekyll build errors for GitHub Pages sites - GitHub Docs.

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.

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.

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

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.

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.