tagging options

Tags will display as plain text if a user adds tags to a post. If user
sets 'link-tags: true' in _config.yml, then Jekyll will make a new page
for each tag which lists all posts with given tag (provided the site is
not deployed through GitHub pages)
This commit is contained in:
Pete 2016-07-27 17:11:58 -05:00
parent ce8ece5fc2
commit 0458bf9803
5 changed files with 14 additions and 10 deletions

View file

@ -11,12 +11,16 @@ layout: base
{% if page.tags.size > 0 %}
<div class="blog-tags">
Tags:
{% if site.link-tags %}
{% for tag in page.tags %}
<a class="tag_list_link" href="/tag/{{ tag }}">{{ tag }}</a>
<a href="/tag/{{ tag }}">{{ tag }}</a>
{% endfor %}
{% else %}
{{ page.tags | join: ", " }}
{% endif %}
</div>
{% endif %}
{{ content }}
{% endif %}
{{ content }}
</article>
<ul class="pager blog-pager">

View file

@ -31,13 +31,9 @@ show-avatar: false
<div class="blog-tags">
Tags:
{% if site.show-tags %}
{% for tag in post.tags %}
<a href="/tag/{{ tag }}">{{ tag }}</a>
{% endfor %}
{% else %}
{{ post.tags | join: ", " }}
{% endif %}
</div>
</article>
{% endif %}