Github Pages构建失败 [英] Github Pages build failure

查看:154
本文介绍了Github Pages构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到有关我的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.

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.

是它抱怨的文件,其余代码包含在该存储库中.我很困惑,因为它所引用的两个文件位于_includes文件夹中,那么可能是什么问题?当我在本地构建并运行该页面时,该页面工作正常.

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.

谢谢!

推荐答案

我遇到了同样的问题,同样的错误消息,您可能从github上收到了一篇文章,指出存在一个符号链接错误,就我而言,我得到了这个: /p>

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:

符号链接/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.18/ext/ffi_c/libffi-x86_64-linux-gnu/include/ffitarget.h定位到您的站点存储库中不存在的文件.

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.

解决方案是在本地构建您的网站,并且仅将_site文件夹拍摄到github.

Solution is build your site locally and only shoot _site folder to github.

请按照以下步骤操作:

  1. 制作一个网站文件夹的副本(这是您的备份,因为您的原始文件夹将被缩减为一个文件夹,是的,您猜对了_site文件夹
  2. 在终端中切换到原始文件夹并运行:jekyll build --safe
  3. 现在删除目录中除_site文件夹之外的所有文件夹
  4. 实际上我们只希望_site文件夹的内容->您可能知道如何摆脱该文件夹
  5. 现在是时候将内容拍摄到github gh-pages了,我假设您已经有一个github存储库.
  6. 在终端中再次输入:git add .git commit -m "static build"git push origin gh-pages
  7. 享受您在github页面上托管的jekyll网站!
  1. 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
  2. in your terminal switch to your original folder and run:jekyll build --safe
  3. now delete all folders in the directory except the _site folder
  4. actually we only want the content of _site folder -> you probably know how to get rid off the folder
  5. now it is time to shoot the content to github gh-pages, I assume you already have a github repo.
  6. type again in your terminal: git add ., git commit -m "static build", git push origin gh-pages
  7. enjoy your jekyll website hosted on github pages!

这篇关于Github Pages构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆