another go with tags

This commit is contained in:
Lukasz Skotarek 2020-04-04 16:52:26 +02:00
parent 1bcb55eba1
commit 73dd6adab0
3 changed files with 15 additions and 14 deletions

View file

@ -28,8 +28,8 @@
<nav> <nav>
<a href="{{ site.baseurl }}/">Blog</a> <a href="{{ site.baseurl }}/">Blog</a>
<!-- <a href="{{ site.baseurl }}/tags">Posts by tags</a> <a href="{{ site.baseurl }}/tags">Tags</a>
<a href="{{ site.baseurl }}/categories">Posts by categories</a> --> <!-- <a href="{{ site.baseurl }}/categories">Posts by categories</a> -->
<a href="{{ site.baseurl }}/about">About</a> <a href="{{ site.baseurl }}/about">About</a>
</nav> </nav>
</header> </header>

13
tags.html Normal file
View file

@ -0,0 +1,13 @@
---
layout: page
title: Posts by tags
permalink: /tags/
---
{% for tag in site.tags %}
<h3>{{ tag[0] }}</h3>
<ul>
{% for post in tag[1] %}
<li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
{% endfor %}

12
tags.md
View file

@ -1,12 +0,0 @@
---
layout: page
title: Posts by tags
permalink: /tags/
---
{% for tag in site.tags %}
*{{ tag[0] }}
{% for post in tag[1] %}
⋅⋅*[{{ post.title }}]({{ post.url }}
{% endfor %}
{% endfor %}