Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jekyll 液体不在单独的页面上呈现_Jekyll_Liquid - Fatal编程技术网

Jekyll 液体不在单独的页面上呈现

Jekyll 液体不在单独的页面上呈现,jekyll,liquid,Jekyll,Liquid,我最近遇到了这样一个问题,在不同的页面上包含的内容加载不正确 这是我的下载.html: --- 布局:默认值 --- {%if site.downloads%} {%include downloads.html%} {%else%} 下载 当时没有下载。晚点再来 {%endif%} 但这一切表明: 这是我的\u layouts/default.html: {%include header.html%} {%if site.layout=='堆叠'%} {%include masthead.h

我最近遇到了这样一个问题,在不同的页面上包含的内容加载不正确

这是我的
下载.html

---
布局:默认值
---
{%if site.downloads%}
{%include downloads.html%}
{%else%}
下载
当时没有下载。晚点再来

{%endif%}
但这一切表明:

这是我的
\u layouts/default.html

{%include header.html%}
{%if site.layout=='堆叠'%}
{%include masthead.html元数据=false%}

{{page.title}} {{content}} {%else%} {%include masthead.html元数据=true%}

{{page.title}} {{content}} {%endif%} {%include footer.html%}
这是我的
\u includes/downloads.html

下载
我在GitHub上下载的大部分内容/其他内容

{%用于在site.downloads%} {%include download-card.html%} {%endfor%}
这是我的
\u includes/download card.html

{%if download.download\u url%}
{%endif%}
这是我的
\u config.yml

布局:侧栏
款式:深色
插件:
-杰基尔八角星
-JekyllGithub元数据
-杰莫吉
永久链接:/:年/:月/:日/:标题/
默认值:
-范围:
路径:“
类型:“员额”
价值观:
布局:“职位”
下载:
-名称:测试
描述:这只是一个测试项目
图片地址:https://raw.githubusercontent.com/github/explore/6c6508f34230f0ac0d49e847a326429eefbfc030/topics/css/css.png
下载网址:https://example.com
它在我的
主页
布局上呈现得非常好:

{%include header.html%}
{%if site.layout=='堆叠'%}
{%include masthead.html元数据=true%}
{{content}}
{%if site.topics%}
{%include interests.html%}
{%endif%}
{0%}
{%include thinks.html%}
{%end除非%}
{%else%}
{%include masthead.html元数据=true%}
{%除非内容==“”%}
{{content}}
{%end除非%}
{%if site.topics%}
{%include interests.html%}
{%endif%}
{0%}
{%include thinks.html%}
{%end除非%}
{%endif%}
{%include footer.html%}

如果你能帮忙,谢谢你。我真的不知道为什么会发生这种情况。

我想说,在删除默认布局中的一个
{{{content}
标记后,它会起作用。很可能试图扩展这两个标签(即使它是在一个条件后面)。@Ross我这样做了,但现在没有显示任何内容。我甚至用文本替换了if语句,但它没有显示出来。没有整个站点进行测试是很困难的,但我仍然非常确定这是真的。尝试删除if/else和不需要的内容大小写,即确保每个文件只有一个
{{content}
。@Ross已经尝试过了。这也是我模板的一部分,如果我选择要“堆叠”的布局,它将使用该内容标记。但我也试着把它取下来,但它没能把它修好。我觉得杰基尔只是忽略了那一页。它在错误的路径中吗?它在我的网站的根目录中。我想说,在删除默认布局中的一个
{{content}
标记后,它就可以工作了。很可能试图扩展这两个标签(即使它是在一个条件后面)。@Ross我这样做了,但现在没有显示任何内容。我甚至用文本替换了if语句,但它没有显示出来。没有整个站点进行测试是很困难的,但我仍然非常确定这是真的。尝试删除if/else和不需要的内容大小写,即确保每个文件只有一个
{{content}
。@Ross已经尝试过了。这也是我模板的一部分,如果我选择要“堆叠”的布局,它将使用该内容标记。但我也试着把它取下来,但它没能把它修好。我觉得杰基尔只是忽略了那一页。它在错误的路径中吗?它位于我网站的根目录中。