From 0009888178b71c35561d1b041a709cba714cadcd Mon Sep 17 00:00:00 2001 From: purple-force <1017704437@qq.com> Date: Wed, 10 Mar 2021 19:26:19 +0800 Subject: [PATCH] feat: merge https://github.com/txd-team/docsite/pull/84 --- package.json | 2 +- website/src/pages/blogDetail/index.jsx | 4 ++-- website/src/pages/documentation/index.jsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 094dc75..fd019fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docsite", - "version": "1.3.10", + "version": "1.3.11", "description": "A tool for build static doc site(react)", "bin": { "docsite": "./bin/docsite.js" diff --git a/website/src/pages/blogDetail/index.jsx b/website/src/pages/blogDetail/index.jsx index 7991a14..a7a7ebe 100644 --- a/website/src/pages/blogDetail/index.jsx +++ b/website/src/pages/blogDetail/index.jsx @@ -39,7 +39,7 @@ class BlogDetail extends Language { duration: 1000, smooth: 'easeInOutQuint', }); - location.hash = "#" + id; + location.hash = `#${id}`; } }); } @@ -49,7 +49,7 @@ class BlogDetail extends Language { this.handleRelativeImg(); const hash = location.hash; if (hash) { - const id = hash.replace(/^#/g, ""); + const id = hash.replace(/^#/g, ''); scroller.scrollTo(id, { duration: 1000, smooth: 'easeInOutQuint', diff --git a/website/src/pages/documentation/index.jsx b/website/src/pages/documentation/index.jsx index 17bcd67..558f199 100644 --- a/website/src/pages/documentation/index.jsx +++ b/website/src/pages/documentation/index.jsx @@ -43,7 +43,7 @@ class Documentation extends Language { duration: 1000, smooth: 'easeInOutQuint', }); - location.hash = "#" + id; + location.hash = `#${id}`; } }); } @@ -53,7 +53,7 @@ class Documentation extends Language { this.handleRelativeImg(); const hash = location.hash; if (hash) { - const id = hash.replace(/^#/g, ""); + const id = hash.replace(/^#/g, ''); scroller.scrollTo(id, { duration: 1000, smooth: 'easeInOutQuint',