{% load djacore_tags %}
<div class="list-group">
{% for item in results %}
    <a href="{{ item.get_absolute_url }}" class="list-group-item list-group-item-action">
        <h5>{{ item.title|highlight:query}}</h5>
        {% if item.meta_description %}
        <p class="mb-1 text-muted">{{ item.meta_description|highlight:query }}</p>  
        {% else %}
        <p class="mb-1 text-muted">{{ item.content|clean_truncate:100|highlight:query }}</p> 
        {% endif %}
    </a>
    {% empty %}
    <div class="alert alert-warning">该分类下无匹配结果</div>
{% endfor %}
</div>
