feat: add tags page
This commit is contained in:
parent
6f6f79f11f
commit
210a278ab1
3 changed files with 43 additions and 1 deletions
19
src/content/pages/tags.html
Normal file
19
src/content/pages/tags.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
title: All tags
|
||||
permalink: /tags/index.html
|
||||
layout: base
|
||||
---
|
||||
|
||||
<section class="[ flow ]">
|
||||
<h1>Tags</h1>
|
||||
{% set categories = collections.categories | entries %}
|
||||
<ol class="[ flex gap-1 list-none p-0 mb-0 ]">
|
||||
{% for tag in categories %}
|
||||
{% set key = tag | first %}
|
||||
{% set count = tag | last %}
|
||||
<li>
|
||||
<a href="/tag/{{ key }}" class="[ pill ] [ px-1 py-0.5 ]">{{ key }} <span class="[ pill-count ]">{{ count }}</span></a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</section>
|
|
@ -1,3 +1,9 @@
|
|||
# Hello world
|
||||
---
|
||||
title: Hello world
|
||||
date: 2017-01-01
|
||||
categories:
|
||||
- test
|
||||
- email
|
||||
---
|
||||
|
||||
This is a test post.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue