Merge pull request #32 from clottman/patch-2

Use tagList with full filter instead of just excluding posts from main post list
This commit is contained in:
Zach Leatherman 2020-01-02 20:59:11 -06:00 committed by GitHub
commit 6afb78f5e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@
<a href="{{ post.url | url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a> <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" datetime="{{ post.date | htmlDateString }}">{{ post.date | readableDate }}</time> <time class="postlist-date" datetime="{{ post.date | htmlDateString }}">{{ post.date | readableDate }}</time>
{% for tag in post.data.tags %} {% for tag in post.data.tags %}
{%- if tag != "posts" -%} {%- if collections.tagList.indexOf(tag) != -1 -%}
{% set tagUrl %}/tags/{{ tag }}/{% endset %} {% set tagUrl %}/tags/{{ tag }}/{% endset %}
<a href="{{ tagUrl | url }}" class="tag">{{ tag }}</a> <a href="{{ tagUrl | url }}" class="tag">{{ tag }}</a>
{%- endif -%} {%- endif -%}