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