Skip to content

Instantly share code, notes, and snippets.

@Lewiscowles1986
Created June 23, 2015 02:06
Show Gist options
  • Save Lewiscowles1986/f49fccd54c96f4f6bf3a to your computer and use it in GitHub Desktop.
Save Lewiscowles1986/f49fccd54c96f4f6bf3a to your computer and use it in GitHub Desktop.
Tag Cloud Include for Jekyll
{% assign all_tags = site.tags|size %}
<div class="tagcloud">{% for tag in site.tags %}
{% assign tag_name = tag|first %}
{% assign tag_count = tag|last|size %}
{% assign tag_avg = tag_count | div: all_tags %}
<span class="tag" style="font-size: {{ tag_avg | times: 100 }}%;">{{ tag_name }}</span>{% if false %} ({{ tag_count }}){% endif %}
{% endfor %}</div>
@Lewiscowles1986
Copy link
Author

😊 Apparently in 2013, someone else found how to make tag cloud...

http://vvv.tobiassjosten.net/jekyll/jekyll-tag-cloud/

There's is better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment