From 44fe93865912ec1ae10f552b4b31b0ffcea582c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E5=A2=A8?= <461009747@qq.com> Date: Sat, 17 Aug 2019 22:54:48 +0800 Subject: [PATCH 1/3] fix some bug --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 1bba125..7b75da2 100644 --- a/index.js +++ b/index.js @@ -11,6 +11,10 @@ hexo.extend.filter.register('after_post_render', function(data){ if(config.post_asset_folder){ var link = data.permalink; var beginPos = getPosition(link, '/', 3) + 1; + // config.root not '/',skip it others may double,fix the problem,hope accept + if(config.root != '/'){ + beginPos = getPosition(link, '/', 4) + 1; + } var appendLink = ''; // In hexo 3.1.1, the permalink of "about" page is like ".../about/index.html". // if not with index.html endpos = link.lastIndexOf('.') + 1 support hexo-abbrlink From d7c9029ed18c9851ae4d7c44796e0ba439c78f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E5=A2=A8?= <461009747@qq.com> Date: Sun, 18 Aug 2019 17:49:27 +0800 Subject: [PATCH 2/3] update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c714b8..c86dc1d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Give asset image in hexo a absolutely path automatically # Usege ```shell -npm install hexo-asset-image --save +npm install https://github.com/ZimoLoveShuang/hexo-asset-image --save ``` # Example From d2e7f69679a2ca2cc6d61ba49578643a0a71674c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E5=A2=A8?= <461009747@qq.com> Date: Sat, 30 Nov 2019 08:40:11 +0800 Subject: [PATCH 3/3] fix bug --- index.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/index.js b/index.js index 7b75da2..1bba125 100644 --- a/index.js +++ b/index.js @@ -11,10 +11,6 @@ hexo.extend.filter.register('after_post_render', function(data){ if(config.post_asset_folder){ var link = data.permalink; var beginPos = getPosition(link, '/', 3) + 1; - // config.root not '/',skip it others may double,fix the problem,hope accept - if(config.root != '/'){ - beginPos = getPosition(link, '/', 4) + 1; - } var appendLink = ''; // In hexo 3.1.1, the permalink of "about" page is like ".../about/index.html". // if not with index.html endpos = link.lastIndexOf('.') + 1 support hexo-abbrlink