【发布时间】:2016-02-14 21:49:16
【问题描述】:
今天刚开始使用 Jekyll,我遇到了问题...这是我的错误消息:
Unknown tag 'endfor' in _includes/masonry.html
我看不出错误的原因。请帮我! 这是 jekyll 认为错误的代码:
<div class="gallery masonry-gallery no-margin">
{% for item in page.slideshow %}
<figure class="gallery-item">
<header class='gallery-icon'>
<a href="{% if item.image_small %}{{ item.image_small }}{{ endif }}" class="popup"><img src="{{ item.image }}" alt="" /></a>
</header>
<figcaption class='gallery-caption'>
<div class="entry-summary">
<h3>{% if item.caption %}{{ item.caption }}{% endif %}</h3>
<p>{% if item.description %}{{ item.description }}{% endif %}</p>
</div>
</figcaption>
</figure>
{% endfor %}
有趣的是,当我取出 for 循环时,我得到了这个:
Liquid syntax error: 'if' tag was never closed
对我来说绝对没有意义...请帮助我!!!
提前致谢, 最大
【问题讨论】:
-
我已经阅读了 347 个以“这可能是错误吗?”开头的问题。一个是错误。