سؤال

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?

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

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.

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

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

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!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top