From 6350da82ff7715b87fadb1ebaf33eee75f8bf672 Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 24 Sep 2024 10:48:02 +0800 Subject: [PATCH 1/3] Optimize site configuration by removing the logo settings --- src/utils/themeContext.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/themeContext.ts b/src/utils/themeContext.ts index 55bc502..3920bc5 100644 --- a/src/utils/themeContext.ts +++ b/src/utils/themeContext.ts @@ -12,6 +12,7 @@ export interface ThemeContext { rootDir: string include: string[] nav: NavConfig + logo: string sidebarOptions: Options | Options[] } From b27b30d7cc7fe1aec1130a4b302c99551d2fc5ad Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 24 Sep 2024 15:32:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=9B=9E=E9=80=80themeConfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.ts | 8 ++++---- src/utils/themeContext.ts | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/config.ts b/src/config.ts index 93a7dc4..80f9290 100644 --- a/src/config.ts +++ b/src/config.ts @@ -91,10 +91,10 @@ function genConfig() { themeConfig: { // https://vitepress.dev/reference/default-theme-config siteTitle: false, - // logo: { - // src: '/logo-horizontal.svg', - // alt: 'Logo: RLE.wiki', - // }, + logo: { + src: '/logo-horizontal.svg', + alt: 'Logo: RLE.wiki', + }, nav, sidebar: generateSidebar(), socialLinks: [{ icon: 'github', link: githubRepoLink }], diff --git a/src/utils/themeContext.ts b/src/utils/themeContext.ts index 3920bc5..55bc502 100644 --- a/src/utils/themeContext.ts +++ b/src/utils/themeContext.ts @@ -12,7 +12,6 @@ export interface ThemeContext { rootDir: string include: string[] nav: NavConfig - logo: string sidebarOptions: Options | Options[] } From 278b495b4a00fd504187bd640a8b18ea94bd1972 Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 24 Sep 2024 17:31:19 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96logo=E5=92=8CsiteTitle?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=EF=BC=8C=E6=94=B9=E4=B8=BA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E7=9A=84=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.ts | 9 +++------ src/utils/themeContext.ts | 2 ++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/config.ts b/src/config.ts index 80f9290..28f5470 100644 --- a/src/config.ts +++ b/src/config.ts @@ -43,7 +43,7 @@ function countWords(content: string): number { // https://vitepress.dev/reference/site-config function genConfig() { const themeConfig = useThemeContext() - const { siteTitle, githubRepoLink, nav } + const { siteTitle, githubRepoLink, nav, siteLogo, SiteTitle} = themeConfig return defineConfig({ lang: 'zh-CN', @@ -90,11 +90,8 @@ function genConfig() { ], themeConfig: { // https://vitepress.dev/reference/default-theme-config - siteTitle: false, - logo: { - src: '/logo-horizontal.svg', - alt: 'Logo: RLE.wiki', - }, + siteTitle: SiteTitle, + logo: siteLogo, nav, sidebar: generateSidebar(), socialLinks: [{ icon: 'github', link: githubRepoLink }], diff --git a/src/utils/themeContext.ts b/src/utils/themeContext.ts index 55bc502..4932949 100644 --- a/src/utils/themeContext.ts +++ b/src/utils/themeContext.ts @@ -7,6 +7,8 @@ type NavConfig = DefaultTheme.Config['nav'] export interface ThemeContext { siteTitle: string + siteLogo: string + SiteTitle: string siteDescription: string githubRepoLink: string rootDir: string