Skip to content

Commit

Permalink
tag list structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Gardner committed Jan 6, 2023
1 parent 9b62faf commit 94b7ade
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion _includes/articleslist.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
<li class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
<a href="{{ post.url | url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a>
<time class="postlist-date icon-date" datetime="{{ post.date | htmlDateString }}">{{ post.date | readableDate }}</time>
<ul class="post-tags">
{% for tag in post.data.tags | filterTagList %}
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
<li class="post-tags__item">
<a href="{{ tagUrl | url }}" class="post-tag icon-tag">{{ tag }}</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ol>
4 changes: 2 additions & 2 deletions _includes/layouts/article.njk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ templateClass: tmpl-article
<ul class="post-tags">
{%- for tag in tags | filterTagList %}
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<li>
<a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
<li class="post-tags__item">
<a href="{{ tagUrl | url }}" class="post-tag icon-tag">{{ tag }}</a>
</li>
{%- endfor %}
</ul>
Expand Down
4 changes: 2 additions & 2 deletions tags-list.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ layout: layouts/home.njk
<ul class="post-tags">
{% for tag in collections.tagList %}
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<li>
<a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>
<li class="post-tags__item">
<a href="{{ tagUrl | url }}" class="post-tag icon-tag">{{ tag }}</a>
</li>
{% endfor %}
</ul>

0 comments on commit 94b7ade

Please sign in to comment.