D0n9X1n / hexo-tag-cloud

Yet, just another tag cloud plugin for hexo.
https://www.npmjs.com/package/hexo-tag-cloud
MIT License
147 stars 27 forks source link
hexo hexo-tag-cloud tag-cloud

hexo-tag-cloud

GitHub release (latest SemVer including pre-releases) Build Status Scrutinizer Code Quality

中文说明版本

Yet, just another tag cloud plugin for hexo.

How it looks like

TagCloud

And you can see online live demo by clicking here

How to Use

Install

For ejs Users

If you are using icarus, please see Issue #31.

For swig Users

For jade Users

For pug Users

if site.tags.length
  .card-widget.card-tags
    .card-content
      .item-headline
        i.fa.fa-tags(aria-hidden="true")
        span= _p('aside.card_tags')
        script(type="text/javascript" charset="utf-8" src="https://github.com/D0n9X1n/hexo-tag-cloud/raw/master/js/tagcloud.js")
        script(type="text/javascript" charset="utf-8" src="https://github.com/D0n9X1n/hexo-tag-cloud/raw/master/js/tagcanvas.js")
        #myCanvasContainer.widget.tagcloud(align='center')
          canvas#resCanvas(width='200', height='200', style='width=100%')
            != tagcloud()
          != tagcloud({min_font: 16, max_font: 24, amount: 50, color: true, start_color: '#999', end_color: '#99a9bf'})

Last step

Customize

Now the hexo-tag-cloud plugin support customize feature. It's simple to change the color and the font for the tag cloud.

# hexo-tag-cloud
tag_cloud:
    textFont: 'Trebuchet MS, Helvetica'
    textColor: '#333'
    textHeight: 25
    outlineColor: '#E2E1D1'
    maxSpeed: 0.5 # range from [0.01 ~ 1]
    pauseOnSelected: false # true means pause the cloud tag movement when highlight a tag

Troubleshooting

Submit issue please

Thanks