From 8b875b5343a0e3bb67f8300c5c987c2cd15aac92 Mon Sep 17 00:00:00 2001 From: "zxq01158352@antgroup.com" Date: Fri, 4 Aug 2023 15:27:57 +0800 Subject: [PATCH 1/8] rm slogan title --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index 4e93cb8b9..ed899a85f 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,7 +2,7 @@ {{ $langData := index .Site.Data .Site.Language.Lang }} {{ $data := $langData.home }} - {{ .Site.Title }} · {{ $data.slogan.title }} + {{ .Site.Title }} {{ end }} {{ define "main" }} From b2eac9b2dfd2cd7e27c95ee14a99fe4df661a588 Mon Sep 17 00:00:00 2001 From: "zxq01158352@antgroup.com" Date: Tue, 8 Aug 2023 11:28:04 +0800 Subject: [PATCH 2/8] delet slogan title --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index ed899a85f..4e93cb8b9 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,7 +2,7 @@ {{ $langData := index .Site.Data .Site.Language.Lang }} {{ $data := $langData.home }} - {{ .Site.Title }} + {{ .Site.Title }} · {{ $data.slogan.title }} {{ end }} {{ define "main" }} From 62f9bb4755c4abf7dd2dea291e94c4ce6da419cd Mon Sep 17 00:00:00 2001 From: "zxq01158352@antgroup.com" Date: Tue, 22 Aug 2023 15:38:30 +0800 Subject: [PATCH 3/8] fix imgage picture failure --- assets/js/app.js | 1 + layouts/partials/post/article.html | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 2fc09a825..6589f0599 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -33,6 +33,7 @@ const main = () => { // image zoom $$('.typo img').forEach(imgElem => { zoom(imgElem) + }) } diff --git a/layouts/partials/post/article.html b/layouts/partials/post/article.html index c2e840561..08f270eea 100644 --- a/layouts/partials/post/article.html +++ b/layouts/partials/post/article.html @@ -1,3 +1,22 @@
- {{ .Content | markdownify }} -
\ No newline at end of file + {{ .Content | markdownify }} + + + \ No newline at end of file From 1c4d2a1e4f8fb30557ef3c3127fc6b7d0034ce93 Mon Sep 17 00:00:00 2001 From: "zxq01158352@antgroup.com" Date: Mon, 28 Aug 2023 18:09:06 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/partials/post/article.html | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/layouts/partials/post/article.html b/layouts/partials/post/article.html index 08f270eea..fc2b7ee3b 100644 --- a/layouts/partials/post/article.html +++ b/layouts/partials/post/article.html @@ -4,19 +4,15 @@ \ No newline at end of file From 149a69914bee61710e6a2acad863899ca75e6dc4 Mon Sep 17 00:00:00 2001 From: "zxq01158352@antgroup.com" Date: Tue, 29 Aug 2023 09:51:44 +0800 Subject: [PATCH 5/8] =?UTF-8?q?fix=20img=20url=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/partials/post/article.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/layouts/partials/post/article.html b/layouts/partials/post/article.html index fc2b7ee3b..823b51488 100644 --- a/layouts/partials/post/article.html +++ b/layouts/partials/post/article.html @@ -7,11 +7,9 @@ // 选取所有img标签 const imgElements = article.querySelectorAll('img'); - console.log(imgElements,'imgElements') + // 遍历img标签数组 imgElements.forEach(img => { - // 获取img标签的src属性值 - const src = img.getAttribute('src'); img.setAttribute('referrerpolicy', 'no-referrer'); }); From 471290079e8a279c484b5bc98d6909404a30a4f0 Mon Sep 17 00:00:00 2001 From: "zxq01158352@antgroup.com" Date: Tue, 29 Aug 2023 11:22:12 +0800 Subject: [PATCH 6/8] fix img erro --- layouts/partials/post/article.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/layouts/partials/post/article.html b/layouts/partials/post/article.html index 823b51488..abb3b36cd 100644 --- a/layouts/partials/post/article.html +++ b/layouts/partials/post/article.html @@ -4,12 +4,19 @@ \ No newline at end of file From 3db9a35cf1e4a38420ef6317fdaf11dcf723114d Mon Sep 17 00:00:00 2001 From: "zxq01158352@antgroup.com" Date: Tue, 29 Aug 2023 11:47:42 +0800 Subject: [PATCH 8/8] fix --- layouts/partials/post/article.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/layouts/partials/post/article.html b/layouts/partials/post/article.html index 6887aff28..bf6dd33fd 100644 --- a/layouts/partials/post/article.html +++ b/layouts/partials/post/article.html @@ -11,15 +11,13 @@ // 遍历img标签数组 imgElements.forEach(img => { const src = img.getAttribute('src'); + //图片格式列表 const imageFormats = ['.jpg', '.jpeg', '.png', '.gif', 'image', '.svg', '.ai', '.psd', '.tiff', '.bmp']; - + //判断url中是否有图片格式结尾,没有则添加.image if (!imageFormats.some(format => src.toLowerCase().endsWith(format))) { img.setAttribute('src', src + '.image'); } - - - img.setAttribute('referrerpolicy', 'no-referrer'); }); \ No newline at end of file