github-pages - /_layouts/default.html 中包含一个符号链接文件或在您的 _includes 目录中不存在
问题描述
当我尝试构建我的 github.io 页面时,我收到了这个错误。
A file was included in /_layouts/default.html that is a symlink or does not exist in your _includes directory.
这个错误是什么意思?这是我的 Github 网站:https ://github.com/zechnegli/zecheng.github.io 。
谢谢!
解决方案
这意味着您有一个链接_layouts/default.html
引用了一个不存在的文件。
检查_layouts/default.html
:
<!DOCTYPE html>
<html>
{% include head.html %}
<body id="page-top" class="index">
{% include nav.html %}
{% include header.html %}
{% include portfolio_grid.html %}
{% include about.html %}
{% if site.contact == "static" %}
{% include contact_static.html %}
{% elsif site.contact == "disqus" %}
{% include contact_disqus.html %}
{% else %}
{% include contact.html %}
{% endif %}
{% include footer.html %}
{% include modals.html %}
{% include js.html %}
</body>
</html>
所有included
文件必须在_includes
目录中:
如您所见,至少contact_disqus.html
丢失了。
推荐阅读
- intellij-idea - 在 Dart / IntelliJ Idea 中,当您错过返回时如何使其成为错误?
- c# - 如何跟踪特定元素是否存在?
- ruby-on-rails - ActiveAdmin 按组分隔范围不起作用
- git - 推送提交时禁止来自 Bitbucket 远程的消息
- r - data.table - 应用值向量
- mysql - EF 迁移错误 - Azure - MySQL on App
- java - 如何在java中将一个多维数组的维度传递给另一个?
- bash - 检查作为字符串的浮点数是否大于另一个
- reactjs - React - 传递多个选项参数/值 onChange
- javascript - Jquery 和 JS 的新手:尝试让相应的价格显示在总数中