1
는이 코드가 있습니다게시물 수를 확인하는 방법은 무엇입니까?
---
layout: default
---
<hr>
{% assign posts_amount = site.posts.length %}
{% if posts_amount == 0 %}
<h2>Sorry :(</h2>
<p>At the moment, content isn't available for you. Check me later!</p>
<hr>
{% else %}
{% for post in site.posts %}
<h2>
<a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
</h2>
<p>{{ post.date | date: "%Y-%m-%d" }}</p>
<hr>
{% endfor %}
{% endif %}
<p>Subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a>.</p>
를하지만, 내가 왜 모르는 작동하지 않습니다.
지킬 : 최신 버전 (3.6.2), 지킬 - 피드 (0.9.2) 및 지킬 - 서 - 태그 (2.3.0).
아이디어가 있으십니까?