Jekyll::Tags
Jekyll plugin for generate a tag cloud.
Installation
Install it yourself as:
$ gem install jekyll-tags
Usage
Add follow line into _plugins/ext.rb
require 'jekyll/tags'
Now you must create a tag cloud. For example in some_page.html
<div id="tag-cloud">
<h3>Tags</h3>
{% assign tags = site.tags | tag_cloud_build %}
{% for tag in tags %}
<span class="tag" style="font-size: {{tag.last}}em;">
{{ tag.first }}
</span>
{% endfor %}
</div>
When you use filter site.tags | tag_cloud_build
you pass into filter
site.tags
and take array like [[tag1, 1], [tag2, 2], [tag3, 10]]
First element is a you tag. Second is a frequency.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
The MIT License