【问题标题】:Jekyll blog error: Could not locate the included file 'file.ext' in any "_includes"Jekyll 博客错误:无法在任何“_includes”中找到包含的文件“file.ext”
【发布时间】:2018-08-06 07:31:35
【问题描述】:

我是使用 jekyll 作为 github 博客页面创建者的新手。现在我尝试在 _posts 文件夹下编写一个 md 文件,我从 Jekyll Docs 复制文本和布局,因为它包含一些 Liquid 语法(如上所示)。 当我在本地运行 Jekyll 时,会显示以下错误。

Liquid Exception: Could not locate the included file 'file.ext' in any of
 ["C:/Developments/GitRepository/testRepository/blogFork1/_includes"]. 
Ensure it exists in one of those directories and, if it is a symlink, 
does not point outside your site source. 
in C:/Developments/blogFork1/_posts/2018-08-03-first-blog.md
我在 md 文件中写的内容:

如何将这些陈述视为一般陈述?感谢任何人的帮助!

【问题讨论】:

    标签: ruby markdown jekyll liquid


    【解决方案1】:

    错误表明您正在尝试在帖子中包含file.ext。我认为你不需要这个。如果这样做,您必须在root/_includes 中创建一个名为file.ext 的文件。但正如我所说,我认为您不需要此文件,因为文档只是告诉您如何在帖子中包含任何扩展名的文件。只需从您的帖子中删除 {% include file.ext %}

    【讨论】:

    • 谢谢,我已经解决了这个问题,一开始,我认为这个标签在markdown语法中不会生效,虽然它生效了。
    猜你喜欢
    • 2017-02-05
    • 1970-01-01
    • 1970-01-01
    • 2012-05-18
    • 2015-12-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-22
    相关资源
    最近更新 更多