This repository has been archived by the owner. It is now read-only.
A Liquid tag plugin for Jekyll, which enables you to collect, order and filter tags of your posts.
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.codeclimate.yml
.gitignore
.rubocop.yml
Gemfile
README.md
Rakefile
jekyll-tagslist.gemspec

README.md

Jekyll Tags List Plugin

Join the chat at https://gitter.im/crispgm/jekyll-tags-list-plugin Code Climate

A Liquid tag plugin for Jekyll, listed on https://jekyllrb.com/docs/plugins/.

Installation

  1. Add the following to your site's Gemfile:

    gem "jekyll-tagslist"
    
  2. Add the following to your site's _config.yml:

    gems:
      - jekyll-tagslist
    
  3. Add the following in your site's template(s):

    <div class="article-tag">
      {% tags_list :threshold => 1, :show_count => 1, :sort_by => count, :order_by => desc, :limit => 20 %}
    </div>
    
  4. The output are as follows:

    <div class="article-tag">
      <div class="tag-item"><div class="tag-item-name">Mac</div><div class="tag-item-count">8</div></div>
      <div class="tag-item"><div class="tag-item-name">OSX</div><div class="tag-item-count">5</div></div>
      <div class="tag-item"><div class="tag-item-name">PHP</div><div class="tag-item-count">3</div></div>
      <div class="tag-item"><div class="tag-item-name">Tools</div><div class="tag-item-count">2</div></div>
    </div>
    

Usage

:threshold

  • Threshold of tag count
  • Default Value: 1
  • Values: Any positive integers

:show_count

  • Whether show tag count in tags list
  • Default Value: 1(which means true)
  • Set to :show_count => 0 if not need

:sort_by

  • Default Value: name
  • Values: name|count|time

:order_by

  • Default Value: asc
  • Values: asc|desc

:limit

  • Default Value: 0
  • Values: Any positive integers

Example

https://crisp.lol/blog.html

Notice: The blog posts might be in Chinese.