<?php snippet('header') ?>

<?php $tags = $site->page("entries")->children()->listed()->pluck('tags', ',', true) ?>

<!-- <h1>lists</h1> -->

<ul>
    <?php foreach($tags as $tag): ?>

        <?php $count = $site->page("entries")->children()->listed()->filterBy('tags', $tag)->count() ?>

        <li>
            <a href="/filter/by:<?= $tag ?>"><?= $tag ?></a>
            <span class="count"><?= $count ?></span>
        </li>
    <?php endforeach ?>
</ul>

<?php snippet('footer') ?>