问题
I'm getting the following error about my Jekyll Github Pages reop:
Your site is having problems building: A file was included in source/blog/index.html that is a symlink or does not exist in your _includes directory.
This is the file it is complaining about, and the rest of the code is contained in that repo. I'm confused because the two files it is referencing are in the _includes
folder, so what could be the issue? The page works fine when I build and run it locally.
Thanks!
回答1:
I experienced the same problem, same error message, you probably got a post from github stating there is a symlink error, in my case I got this one:
The symbolic link
/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.18/ext/ffi_c/libffi-x86_64-linux-gnu/include/ffitarget.h
targets a file which does not exist within your site's repository.
I do not know why this error occurs but I do know a workaround that probably works for you too.
Solution is build your site locally and only shoot _site folder to github.
Follow these steps:
- make a copy of your website folder (this one is your back-up, because your original folder will be reduced to only one folder, yes you guessed right the _site folder
- in your terminal switch to your original folder and run:
jekyll build --safe
- now delete all folders in the directory except the _site folder
- actually we only want the content of _site folder -> you probably know how to get rid off the folder
- now it is time to shoot the content to github gh-pages, I assume you already have a github repo.
- type again in your terminal:
git add .
,git commit -m "static build"
,git push origin gh-pages
- enjoy your jekyll website hosted on github pages!
来源:https://stackoverflow.com/questions/44401664/github-pages-build-failure