From b0120bfd8fdb532fdb9f97016e2c19fbcb9e38b4 Mon Sep 17 00:00:00 2001 From: CodeMaker-Zhao Date: Thu, 8 Dec 2022 16:42:53 +0800 Subject: [PATCH 01/26] dynamic import waline/client --- themes/example/components/ExampleRecentComments.js | 4 +++- themes/hexo/components/HexoRecentComments.js | 4 +++- themes/next/components/NextRecentComments.js | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/themes/example/components/ExampleRecentComments.js b/themes/example/components/ExampleRecentComments.js index 32d11463..824246ed 100644 --- a/themes/example/components/ExampleRecentComments.js +++ b/themes/example/components/ExampleRecentComments.js @@ -1,7 +1,9 @@ import React from 'react' -import { RecentComments } from '@waline/client' import BLOG from '@/blog.config' import Link from 'next/link' +import dynamic from 'next/dynamic' + +const { RecentComments } = dynamic(() => import('@waline/client')) /** * @see https://waline.js.org/guide/get-started.html diff --git a/themes/hexo/components/HexoRecentComments.js b/themes/hexo/components/HexoRecentComments.js index 4977ccf4..8925aa90 100644 --- a/themes/hexo/components/HexoRecentComments.js +++ b/themes/hexo/components/HexoRecentComments.js @@ -1,9 +1,11 @@ import React from 'react' -import { RecentComments } from '@waline/client' import BLOG from '@/blog.config' import Card from '@/themes/hexo/components/Card' import { useGlobal } from '@/lib/global' import Link from 'next/link' +import dynamic from 'next/dynamic' + +const { RecentComments } = dynamic(() => import('@waline/client')) /** * @see https://waline.js.org/guide/get-started.html diff --git a/themes/next/components/NextRecentComments.js b/themes/next/components/NextRecentComments.js index 961c3e08..041d8431 100644 --- a/themes/next/components/NextRecentComments.js +++ b/themes/next/components/NextRecentComments.js @@ -1,7 +1,9 @@ import React from 'react' -import { RecentComments } from '@waline/client' import BLOG from '@/blog.config' import Link from 'next/link' +import dynamic from 'next/dynamic' + +const { RecentComments } = dynamic(() => import('@waline/client')) /** * @see https://waline.js.org/guide/get-started.html From 9abce273816ea07149c809eafff0ac5318cd1eff Mon Sep 17 00:00:00 2001 From: huisc Date: Fri, 9 Dec 2022 18:14:57 +0800 Subject: [PATCH 02/26] =?UTF-8?q?next=E4=B8=BB=E9=A2=98=E7=BB=86=E5=BE=AE?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/next/components/BlogPostCard.js | 2 +- themes/next/components/Logo.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/next/components/BlogPostCard.js b/themes/next/components/BlogPostCard.js index 43ae9e65..e1bcd070 100644 --- a/themes/next/components/BlogPostCard.js +++ b/themes/next/components/BlogPostCard.js @@ -86,7 +86,7 @@ const BlogPostCard = ({ post, showSummary }) => {
- + {locale.COMMON.ARTICLE_DETAIL} diff --git a/themes/next/components/Logo.js b/themes/next/components/Logo.js index 46cb814e..69c13a1e 100644 --- a/themes/next/components/Logo.js +++ b/themes/next/components/Logo.js @@ -4,7 +4,7 @@ import React from 'react' const Logo = props => { const { siteInfo, className } = props return -
+
{siteInfo?.title}
{siteInfo?.description}
From 4757fd52144fbbc0fa1d206f7dc66e70b78ca55d Mon Sep 17 00:00:00 2001 From: huisc Date: Fri, 9 Dec 2022 18:43:38 +0800 Subject: [PATCH 03/26] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E3=80=81=E6=A0=87=E7=AD=BE=E3=80=81=E5=BD=92=E6=A1=A3=E4=B8=89?= =?UTF-8?q?=E4=B8=AA=E9=A1=B5=E9=9D=A2=E7=9A=84=E8=83=8C=E6=99=AF=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/next/LayoutArchive.js | 2 +- themes/next/LayoutCategoryIndex.js | 2 +- themes/next/LayoutTagIndex.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/next/LayoutArchive.js b/themes/next/LayoutArchive.js index ce66e25f..3db36dbd 100644 --- a/themes/next/LayoutArchive.js +++ b/themes/next/LayoutArchive.js @@ -39,7 +39,7 @@ export const LayoutArchive = (props) => { return ( -
+
{Object.keys(archivePosts).map(archiveTitle => ( { const { allPosts, categories } = props const { locale } = useGlobal() return -
+
{locale.COMMON.CATEGORY}:
diff --git a/themes/next/LayoutTagIndex.js b/themes/next/LayoutTagIndex.js index d7fae64e..45100a9e 100644 --- a/themes/next/LayoutTagIndex.js +++ b/themes/next/LayoutTagIndex.js @@ -6,7 +6,7 @@ export const LayoutTagIndex = (props) => { const { tags } = props const { locale } = useGlobal() return -
+
{locale.COMMON.TAGS}:
{ tags.map(tag => { From 073516351e087e81e300d24058851c0d232a29ee Mon Sep 17 00:00:00 2001 From: huisc Date: Fri, 9 Dec 2022 22:39:26 +0800 Subject: [PATCH 04/26] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/next/components/Footer.js | 2 +- themes/next/components/Logo.js | 2 +- themes/next/components/SearchInput.js | 2 +- themes/next/components/TopNav.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/next/components/Footer.js b/themes/next/components/Footer.js index cb83aebe..be38a58a 100644 --- a/themes/next/components/Footer.js +++ b/themes/next/components/Footer.js @@ -14,7 +14,7 @@ const Footer = ({ title }) => { return (