You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
581 B
18 lines
581 B
'use strict'; |
|
|
|
function postFancybox(args, content) { |
|
args = args.join(' ').split(','); |
|
var cls = args[0]; |
|
var col = Number(args[1]) || 0; |
|
if (col > 0) { |
|
return `<div class="fancybox ${cls}" col='${col}'> |
|
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')} |
|
</div>`; |
|
} else { |
|
return `<div class="fancybox ${cls}"> |
|
${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')} |
|
</div>`; |
|
} |
|
} |
|
|
|
hexo.extend.tag.register('fancybox', postFancybox, {ends: true});
|
|
|