/** * Button * {% btn url text icon option %} * option: color outline center block larger * color : default/blue/pink/red/purple/orange/green */ 'use strict' const urlFor = require('hexo-util').url_for.bind(hexo) const btn = args => { args = args.join(' ').split(',') const [url = '', text = '', icon = '', option = ''] = args.map(arg => arg.trim()) return `${icon.length ? `` : ''}${text.length ? `${text}` : ''}` } hexo.extend.tag.register('btn', btn, { ends: false })