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',