[fix] gallery & image

This commit is contained in:
xaoxuu 2023-12-30 19:29:37 +08:00
parent 17bb9df1b1
commit e92cb81296
2 changed files with 0 additions and 14 deletions

View File

@ -240,7 +240,6 @@ tag_plugins:
# {% image %}
image:
fancybox: false # true, false
parse_markdown: true # 把 markdown 格式的图片解析成图片标签
# {% timeline %}
timeline:

View File

@ -2,16 +2,3 @@
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) {
if (this.theme.config.tag_plugins.image.parse_markdown) {
data.content = data.content.replace(
/!\[(.*?)\]\((.*?)\s*(?:"(.*?)")?\)/g,
'{% image $2 $3 %}'
);
}
return data;
}
hexo.extend.filter.register('before_post_render', change_image, 9);