diff --git a/_config.yml b/_config.yml index d2a68c7..38dda4f 100755 --- a/_config.yml +++ b/_config.yml @@ -194,7 +194,7 @@ footer: tag_plugins: # {% note text %} note: - default_color: '' # light, dark, red, orange, yellow, green, cyan, blue, purple + default_color: '' # light, dark, red, orange, yellow, green, cyan, blue, purple, warning, error # {% checkbox %} checkbox: interactive: false # enable interactive for user @@ -219,6 +219,9 @@ tag_plugins: # {% timeline %} timeline: max-height: 80vh + # {% mark %} + mark: + default_color: dark # light, dark, red, orange, yellow, green, cyan, blue, purple, warning, error ######## JS Plugins ######## diff --git a/scripts/tags/mark.js b/scripts/tags/mark.js index af008c8..7ecc3e2 100644 --- a/scripts/tags/mark.js +++ b/scripts/tags/mark.js @@ -10,6 +10,9 @@ hexo.extend.tag.register('mark', function(args) { args = hexo.args.map(args, ['color'], ['text']); + if (args.color == null) { + args.color = hexo.theme.config.tag_plugins.mark.default_color + } var el = ''; el += '