From 25a60628375851794cbd49f5cb622dd19da505fd Mon Sep 17 00:00:00 2001 From: snowykami Date: Sat, 31 Aug 2024 07:40:03 +0800 Subject: [PATCH] =?UTF-8?q?:fire:=20=E6=9B=B4=E6=96=B0=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vitepress/config/en.ts | 7 ++----- docs/.vitepress/config/ja.ts | 7 ++----- docs/.vitepress/config/utils.ts | 13 ++++++++++++- docs/.vitepress/config/zh.ts | 7 ++----- docs/.vitepress/config/zht.ts | 7 ++----- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/docs/.vitepress/config/en.ts b/docs/.vitepress/config/en.ts index 95c0178..52a1bf9 100644 --- a/docs/.vitepress/config/en.ts +++ b/docs/.vitepress/config/en.ts @@ -21,11 +21,8 @@ export const en = defineConfig({ ), footer: { message: 'Documentation built with VitePress | API references generated by litedoc', - copyright: 'Copyright (C) 2020-2024 SnowyKami. All Rights Reserved' + copyright: ThemeConfig.copyright }, - outline: { - label: "On this page", - level: [2, 6] - } + outline: ThemeConfig.getOutLine("Page Content") }, }) \ No newline at end of file diff --git a/docs/.vitepress/config/ja.ts b/docs/.vitepress/config/ja.ts index 47d00a2..bb0a0a7 100644 --- a/docs/.vitepress/config/ja.ts +++ b/docs/.vitepress/config/ja.ts @@ -21,11 +21,8 @@ export const ja = defineConfig({ ), footer: { message: 'VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス', - copyright: 'Copyright (C) 2020-2024 SnowyKami. All Rights Reserved' + copyright: ThemeConfig.copyright }, - outline: { - label: "このページについて", - level: [2, 6] - } + outline: ThemeConfig.getOutLine("ページの内容") }, }) \ No newline at end of file diff --git a/docs/.vitepress/config/utils.ts b/docs/.vitepress/config/utils.ts index 8e65fd1..a2c6613 100644 --- a/docs/.vitepress/config/utils.ts +++ b/docs/.vitepress/config/utils.ts @@ -1,3 +1,5 @@ +// 本模块储存一些工具函数和引用 + /** * GetEditLink Options * @param text Edit link text @@ -19,5 +21,14 @@ export const ThemeConfig = { }, text: editPageText }; - } + }, + + getOutLine: (label: string): { label: string; level: [number, number]; } => { + return { + label: label, + level: [2, 6] + }; + }, + + copyright: 'Copyright (C) 2020-2024 SnowyKami. All Rights Reserved' } \ No newline at end of file diff --git a/docs/.vitepress/config/zh.ts b/docs/.vitepress/config/zh.ts index ff3ca89..38a2fd3 100644 --- a/docs/.vitepress/config/zh.ts +++ b/docs/.vitepress/config/zh.ts @@ -21,11 +21,8 @@ export const zh = defineConfig({ ), footer: { message: '文档由 VitePress 构建 | API引用由 litedoc 生成', - copyright: 'Copyright (C) 2020-2024 SnowyKami. All Rights Reserved' + copyright: ThemeConfig.copyright }, - outline: { - label: "页面内容", - level: [2, 6] - } + outline: ThemeConfig.getOutLine("页面内容") }, }) \ No newline at end of file diff --git a/docs/.vitepress/config/zht.ts b/docs/.vitepress/config/zht.ts index 918d0d6..d491f5c 100644 --- a/docs/.vitepress/config/zht.ts +++ b/docs/.vitepress/config/zht.ts @@ -21,11 +21,8 @@ export const zht = defineConfig({ ), footer: { message: '文檔由 VitePress 構建 | API引用由 litedoc 生成', - copyright: 'Copyright (C) 2020-2024 SnowyKami. All Rights Reserved' + copyright: ThemeConfig.copyright }, - outline: { - label: "頁面內容", - level: [2, 6] - } + outline: ThemeConfig.getOutLine("頁面內容") }, }) \ No newline at end of file