Github Pages - A file was included is a symlink or does not exist
Asked Answered
A

5

11

I'm having a problem to build my site on GitHub Pages. I'm receiving the following message:

Your page is having problems building: A file was included in docs/samples/widgets/custom_services.html that is a symlink or does not exist in your _includes directory.

All the files can be viewed at https://github.com/igrejaadventista/iasd-bootstrap/tree/master/docs

The files that are included do exist and are not symlink. Locally I dont have any problem building the pages or viewing them on the browser.

Any suggestions about what is going on?

Adventure answered 21/3, 2014 at 2:57 Comment(1)
Did you ever have any luck with this? I am running into the same issue.Managerial
C
8

It looks like you're using a custom source. You're not allowed to use custom sources in your Jekyll sites on GitHub Pages. They override it to your repo's top directory. So it's looking for ./_includes/... rather than ./docs/_includes.

Charie answered 3/8, 2014 at 19:58 Comment(1)
There is no 'source' in my config file still I'm getting the error in question though I've files in my _include dir.Maidenhair
A
3

It seems you're using Jekyll and this answer is 2 years old, but for anyone else with similar problems: check if you need Jekyll. If you don't, adding an empty file named .nojekyll to the root of the repository should fix it.

Ahders answered 18/3, 2016 at 21:42 Comment(0)
G
2

For me the issue was I was using Jekyll and had a RubyGem that was not supported by Github Pages.

I would suggest trying the following if you are getting the above error and using Jekyll:

  1. Try building locally ( run bundle exec jekyll serve in terminal or bash) and check if you can get the root cause. You need to have Ruby and Bundler installed for this.

  2. If the site builds locally without any issue, the build issue in Github could be due to a different Gem version. You can check the versions of Gems used by Github pages here . Try changing the Gems used locally to the ones used by Github pages, to reproduce the issue locally.

  3. If you would like to still use the Gems you have installed and doesn't need the build to be done by Github pages, you can generate the static site locally by executing jekyll serve and push the just content of "_site" folder to your repository's master branch. This gives us finer control on Gems we wish to use

Goran answered 13/7, 2020 at 14:22 Comment(0)
A
1

just create and add a new file with file name ".nojekyll". This should fix it

Asquint answered 4/10, 2016 at 11:5 Comment(0)
D
1

I had a similar issue while deploying on GitHub an old website built in 2017 with Bulma. After updating all my dependencies, I still got the same error as Filipiz. I deleted the /docs folder, redeployed with git status, add, commit and push and it worked!

Dwelt answered 4/5, 2020 at 21:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.