🏷️ 2.3.0發佈

This commit is contained in:
Jerry
2020-04-26 23:29:38 +08:00
parent 796b8e6df4
commit 0d56db50e4
16 changed files with 127 additions and 87 deletions

View File

@@ -31,8 +31,13 @@ hexo.extend.helper.register('injectHtml', function (data) {
return result
})
hexo.extend.helper.register('cloudTags', function (source, minfontsize, maxfontsize, limit) {
hexo.extend.helper.register('cloudTags', function (options = {}) {
const env = this
const source = options.source
const minfontsize = options.minfontsize
const maxfontsize = options.maxfontsize
const limit = options.limit || 8
let result = ''
const tagLimit = limit === 0 ? source.length : limit
source.sort('name').limit(tagLimit).forEach(function (tags) {