diff --git a/_config.yml b/_config.yml index a1457c7..ed41958 100755 --- a/_config.yml +++ b/_config.yml @@ -239,9 +239,9 @@ tag_plugins: blobcat: https://gcore.jsdelivr.net/gh/norevi/waline-blobcatemojis@1.0/blobs/${name}.png # {% image %} image: - fancybox: # true, false - replace_original: #把markdown格式的图片解析成图片标签 - enable: false + fancybox: false # true, false + parse_markdown: true # 把 markdown 格式的图片解析成图片标签 + # {% timeline %} timeline: max-height: 80vh diff --git a/scripts/filters/index.js b/scripts/filters/index.js index e6da638..b05d95c 100644 --- a/scripts/filters/index.js +++ b/scripts/filters/index.js @@ -3,13 +3,10 @@ hexo.extend.filter.register('after_render:html', require('./lib/img_lazyload').processSite); hexo.extend.filter.register('after_render:html', require('./lib/img_onerror').processSite); -function change_image(data){ - const cfg = this.theme.config.tag_plugins.image.replace_original; - - if (cfg.enable){ - data.content = data.content.replace(/!\[([^\]]*)]\(([^(]+)\)/g, '{% image $2 $1 %}'); +function change_image(data) { + if (this.theme.config.tag_plugins.image.parse_markdown) { + data.content = data.content.replace(/!\[([^\]]*)]\(([^(]+)\)/g, '{% image $2 $1 %}'); } - return data; }