{{ if .Site.Params.widgets.categories }}
{{ if not (eq (len .Site.Taxonomies.categories) 0) }}
<div class="widget-wrap">
    <h3 class="widget-title">{{with .Site.Data.l10n.widgets.categories.title}}{{.}}{{end}}</h3>
    <div class="widget">
        <ul class="category-list">
            {{ range $name, $items := .Site.Taxonomies.categories }}
            <li class="category-list-item">
                <a class="category-list-link" href="{{ $.Site.BaseURL }}categories/{{ $name | urlize | lower }}">
                    {{ $name }}
                </a>
                <span class="category-list-count">{{ len $items }}</span>
            </li>
            {{ end }}
        </ul>
    </div>
</div>
{{ end }}
{{ end }}
