{% block main %} {% if data.docs.length %}

Try one of these suggestions:

{% for doc in data.docs %}

{% if doc._url %}{% endif %}{{ doc.title }}{% if doc._url %}{% endif %}

{% endfor %} {% endif %} {% endblock %}