Skip to content

envygeeks/jekyll-post-tags

Repository files navigation

Code Climate Code Climate Travis CI Donate Gem Version Gem DL

Jekyll Post Tags

Jekyll post tags turns your Jekyll tags into drops without disrupting the way that Jekyll flows... or the way that you work with Jekyll's own tagging system. It also acts as a generator for tag pages, with custom templates (no defaults,) and custom pathing. It is different than other tagging platforms in that it works within what Jekyll already does and might not require you to change your code that much (if at all in some cases.)

Usage

From Within Your Templates

All Tags
<ul class="tags">
  {% for tag in site.tags %}
  <li class="weight-{{ tag[0].weight | round }}">
    <a title="Site Tag: {{ tag[0] }}" href="{{ tag[0].url | pretty }}">
      {{ tag[0] }}
    </a>
  </li>
  {% endfor %}
</ul>
Post Tags
<ul class="tags">
  {% for tag in post.tags %}
  <li class="weight-{{ tag.weight | round }}">
    <a title="Site Tag: {{ tag }}" href="{{ tag.url | pretty }}">
      {{ tag }}
    </a>
  </li>
  {% endfor %}
</ul>