Skip to content

Instantly share code, notes, and snippets.

@OCram85
Created January 16, 2018 08:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OCram85/ad58b3d585705c8be8d0eb646cf516c0 to your computer and use it in GitHub Desktop.
Save OCram85/ad58b3d585705c8be8d0eb646cf516c0 to your computer and use it in GitHub Desktop.
Simple Jekyll Tag Linking w/o plugins (beautiful-jekyll jekyll theme)
layout permalink title show-avatar excerpt search_omit css
page
tags
Tags
true
false
/css/tags.css

{% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} {% assign tags_list = site_tags | split:',' | sort %}

{% for item in (0..site.tags.size) %}{% unless forloop.last %}{% capture this_word %}{{ tags_list[item] | strip_newlines }}{% endcapture %} {{ this_word }}{% endunless %}{% endfor %}

{% for item in (0..site.tags.size) %}{% unless forloop.last %} {% capture this_word %}{{ tags_list[item] | strip_newlines }}{% endcapture %}

{{ this_word }}

    {% for post in site.tags[this_word] %}{% if post.title != null %}
  •  {{ post.date | date: "%B %d, %Y" }}  {{ post.title }}
  • {% endif %}{% endfor %}
{% endunless %}{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment