hexo-butterfly-tag-plugins-plus
Version:
A number of tag plugins for theme-butterfly
17 lines (13 loc) • 440 B
JavaScript
// 'use strict'
//
// function poem (args, content) {
// return `<div class="tip"><b>${content}<b></div>`
// }
//
// hexo.extend.tag.register('tip', tip, { ends: true })
function tip (args, content) {
const tipclass = args ? args.join(' ') : 'info'
return `<div class="tip ${args.join(' ')}">${hexo.render.renderSync({ text: content, engine: 'markdown' })}</div>`
}
hexo.extend.tag.register('tip',tip, { ends: true })