<div class="box">
    <h1 class="is-size-5 has-text-weight-bold">文章分类</h1>
    <div class="dropdown-divider"></div>
<aside class="menu">
    {% for category in category_list %}
    <p class="menu-label">
      {{ category.name }}
    </p>
    <ul class="menu-list">
        {% for subcate in category.baykearticlecategory_set.all %}
            <li>
                <a href="{% url 'baykearticle:category-detail' subcate.id %}" 
                    class="{% if object.category == subcate or object == subcate %} is-active {% endif %}">
                    {{ subcate.name }}
                </a>
            </li>
        {% endfor %}
    </ul>
    {% endfor %}
</aside>
</div>