From a7642faeef86dcb69c948e0b99da0c6821b641fa Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Thu, 26 Nov 2026 10:22:20 -0500 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AF=BC=E8=88=AA=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vitepress/config.mts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 5d4317a9..a9bf4d3a 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -21,6 +21,18 @@ const FORUM_URL = 'https://www.isharkfly.com/tag/opensearch'; const CONTACT_URL = 'https://www.isharkfly.com/t/opensearch/15530'; const REPO_URL = 'https://github.com/iSharkFly-Docs/opensearch-docs-cn'; +// iSharkFly links shown as a dropdown at the end of the nav bar. +function isharkflyNav(zh: boolean): DefaultTheme.NavItem { + return { + text: 'iSharkFly', + items: [ + { text: zh ? 'iSharkFly' : 'iSharkFly', link: FORUM_URL }, + { text: zh ? '文档导航' : 'Docs Portal', link: 'https://docs.isharkfly.com/' }, + { text: zh ? '本站源码' : 'Source Code', link: 'https://src.sharkdat.com/iSharkFly-Docs/OpenSearch-iSharkFly-Com' }, + ], + }; +} + // Sidebar group names (just-the-docs collection names from _config.yml). const zhSidebarText: Record = { 'About OpenSearch': '关于 OpenSearch', @@ -131,7 +143,7 @@ for (const [key, locale] of Object.entries(site.locales)) { { text: '客户端', link: `${b}clients/`, activeMatch: `^${b}clients/` }, { text: 'Data Prepper', link: `${b}data-prepper/`, activeMatch: `^${b}data-prepper/` }, { text: 'Benchmark', link: `${b}benchmark/`, activeMatch: `^${b}benchmark/` }, - { text: '中文论坛', link: FORUM_URL }, + isharkflyNav(true), ], sidebar: mapSidebar(locale.sidebar, link => link, text => zhSidebarText[text] ?? text), }, @@ -151,7 +163,7 @@ for (const [key, locale] of Object.entries(site.locales)) { { text: 'Clients', link: `${enBase}clients/`, activeMatch: `^${enBase}clients/` }, { text: 'Data Prepper', link: `${enBase}data-prepper/`, activeMatch: `^${enBase}data-prepper/` }, { text: 'Benchmark', link: `${enBase}benchmark/`, activeMatch: `^${enBase}benchmark/` }, - { text: 'Forum', link: FORUM_URL }, + isharkflyNav(false), ], sidebar: mapSidebar(locale.sidebar, enLink, text => text), }, -- 2.54.0