{% require 'styles/index.css' %} {# 懒加载脚本 #} {% require 'scripts/lazyload-zepto.js' %} {% require 'scripts/index.js' %} {% use 'schemas/config' as config %}
{% for post in config %}
{{ post.title }}
{{ post.author }}
{# 懒加载元素,data-src="xxx"最终转换为style="background-image:url(xxx)" #}
{# 非末尾卡片底部加分割线 #} {% if not loop.last %}
{% endif %} {% endfor %}
{% enduse %}