mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
17 lines
299 B
JavaScript
17 lines
299 B
JavaScript
/**
|
|
* Butterfly
|
|
* label
|
|
* {% label text color %}
|
|
*/
|
|
|
|
'use strict'
|
|
|
|
function addLabel (args, content) {
|
|
const text = args[0]
|
|
const className = args[1] || 'default'
|
|
|
|
return `<mark class="hl-label ${className}">${text}</mark> `
|
|
}
|
|
|
|
hexo.extend.tag.register('label', addLabel, { ends: false })
|