From 606668e6886aea052c356f1e6eb2a8bfe25e4393 Mon Sep 17 00:00:00 2001 From: mixbo Date: Mon, 6 Nov 2023 17:52:32 +0800 Subject: [PATCH 1/2] Change sidebar title fontsize --- .vitepress/theme/style.scss | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.vitepress/theme/style.scss b/.vitepress/theme/style.scss index dca8ddb7..379e07ee 100644 --- a/.vitepress/theme/style.scss +++ b/.vitepress/theme/style.scss @@ -94,8 +94,10 @@ ol { } } -.level-0 { - .items { - padding-left: 16px; +.VPSidebarItem.level-0 { + .VPLink { + h2 { + font-size: unset; + } } } From 530c2fac5889ac03a9f01844965983612695b465 Mon Sep 17 00:00:00 2001 From: mixbo Date: Mon, 6 Nov 2023 18:27:23 +0800 Subject: [PATCH 2/2] Disable en lang feature --- .vitepress/config.mts | 48 +++++++++++++++++++++---------------- .vitepress/theme/style.scss | 5 +++- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 31da4a7c..aa03a40b 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -64,7 +64,7 @@ export default defineConfig({ appearance: false, lang: "zh-HK", cleanUrls: true, - srcExclude: ["SUMMARY.md", 'zh-HK.md', "zh-CN.md", "en.md"], + srcExclude: ["SUMMARY.md", "zh-HK.md", "zh-CN.md", "en.md"], srcDir: "locales", lastUpdated: true, head: [ @@ -79,30 +79,35 @@ export default defineConfig({ ...siteMetadata, ], locales: { - en: { - label: "English", - lang: "en", - link: "/en/docs", - themeConfig: { - siteTitle: "Whale docs", - editLink: { - pattern: editLinkPattern, - }, - }, - }, + // en: { + // label: "English", + // lang: "en", + // link: "/en/docs", + // themeConfig: { + // nav: [{ text: "Whale Home", link: "https://longbridgewhale.com" }], + // siteTitle: "Whale docs", + // editLink: { + // pattern: editLinkPattern, + // }, + // }, + // }, "zh-CN": { label: "简体中文", lang: "zh-CN", link: "/zh-CN/docs", themeConfig: { siteTitle: "帮助中心", + nav: [{ text: "Whale 首页", link: "https://longbridgewhale.com" }], editLink: { pattern: editLinkPattern, - text: "在 GitHub 上编辑此页", + text: "编辑此页", + }, + lastUpdated: { + text: "最后更新时间", }, docFooter: { - prev: "上篇文档", - next: "下篇文档", + prev: "上一篇", + next: "下一篇", }, }, }, @@ -112,13 +117,17 @@ export default defineConfig({ link: "/zh-HK/docs", themeConfig: { siteTitle: "幫助中心", + nav: [{ text: "Whale 首頁", link: "https://longbridgewhale.com" }], editLink: { pattern: editLinkPattern, - text: "在 GitHub 上编辑此页", + text: "编辑此页", + }, + lastUpdated: { + text: "最後更新時間", }, docFooter: { - prev: "上篇文档", - next: "下篇文档", + prev: "上一篇", + next: "下一篇", }, }, }, @@ -127,9 +136,8 @@ export default defineConfig({ // https://vitepress.dev/reference/default-theme-config themeConfig: { logo: "https://assets.lbkrs.com/uploads/d29e591d-0c3d-4def-b837-cd06dfb4d738/whale-logo.svg", - nav: [{ text: "Whale Home", link: "https://longbridgewhale.com" }], sidebar: { - en: docsSidebarEN, + // en: docsSidebarEN, "zh-CN": docsSidebarZHCN, "zh-HK": docsSidebarZHHK, }, diff --git a/.vitepress/theme/style.scss b/.vitepress/theme/style.scss index 379e07ee..538fc1d9 100644 --- a/.vitepress/theme/style.scss +++ b/.vitepress/theme/style.scss @@ -89,8 +89,11 @@ ol { /* overwrite vitepress components styles*/ .VPNavBarTitle { + .title { + font-size: 18px; + } .VPImage { - margin-right: 24px; + margin-right: 16px; } }