如果该值高于零,此声明应仅返回得分,但无论如何都会返回:
{% for member in site.data.members %}
<div class="player">
{% if member.goals > 0 %}
<span class="goals">{{ member.goals }}</span/>
{% endif %}
</div>
{% endfor %}
我哪里出错?
谢谢Shadowen,这是我的site.data.members文件,它只是一个CSV:
name,position,goals,photo
Joe Bloggs,goalkeeper,0
James Denver,midfielder,2
Edward Martins,forward,0
Tom Kirk,defender/midfielder,0
Carl Swanson,striker,0
Orry Michaels,defender,0
Chris Smith,midfielder,0