/**
* Butterfly
* galleryGroup and allery
*/
'use strict'
const urlFor = require('hexo-util').url_for.bind(hexo)
function gallery (args, content) {
return `
${hexo.render.renderSync({ text: content, engine: 'markdown' }).split('\n').join('')}
`
}
function galleryGroup (args) {
const name = args[0]
const desrc = args[1]
const url = urlFor(args[2])
const img = urlFor(args[3])
return `
${name}
${desrc}
`
}
hexo.extend.tag.register('gallery', gallery, { ends: true })
hexo.extend.tag.register('galleryGroup', galleryGroup)