diff --git a/docusaurus.config.js b/docusaurus.config.js index 6e6dd741..bd9b447f 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -164,7 +164,7 @@ const config = { }, { label: 'Online Trial', - href: 'http://trial.ivorysql.org:8080/', + href: 'https://trial.ivorysql.org/', position: 'left' }, { diff --git a/src/pages/docs-ecosystem.js b/src/pages/docs-ecosystem.js index 65a8f241..aa175b9a 100644 --- a/src/pages/docs-ecosystem.js +++ b/src/pages/docs-ecosystem.js @@ -2,13 +2,14 @@ import React, { useEffect } from 'react'; import Layout from '@theme/Layout'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -const DOCS_BASE = 'https://docs.ivorysql.org'; -const DOCS_VERSION = 'v5.3/v5.3'; +const ECOSYSTEM_URLS = { + en: 'https://docs.ivorysql.org/en/ivorysql-doc/v5.3/cpu_arch_adp', + zh: 'https://docs.ivorysql.org/cn/ivorysql-doc/v5.3/cpu_arch_adp', +}; function buildTarget(locale) { const normalizedLocale = (locale || 'en').toLowerCase(); - const docsLocaleSegment = normalizedLocale.startsWith('zh') ? 'cn' : 'en'; - return `${DOCS_BASE}/${docsLocaleSegment}/ivorysql-doc/${DOCS_VERSION}/5.0`; + return normalizedLocale.startsWith('zh') ? ECOSYSTEM_URLS.zh : ECOSYSTEM_URLS.en; } export default function DocsEcosystemRedirect() { diff --git a/src/pages/docs-installation.js b/src/pages/docs-installation.js index f2ad1e2e..72da2218 100644 --- a/src/pages/docs-installation.js +++ b/src/pages/docs-installation.js @@ -2,13 +2,14 @@ import React, { useEffect } from 'react'; import Layout from '@theme/Layout'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -const DOCS_BASE = 'https://docs.ivorysql.org'; -const DOCS_VERSION = 'v5.3/v5.3'; +const INSTALLATION_URLS = { + en: 'https://docs.ivorysql.org/en/ivorysql-doc/v5.3/3.1#quick-installation', + zh: 'https://docs.ivorysql.org/cn/ivorysql-doc/v5.3/3.1#%E5%BF%AB%E9%80%9F%E5%AE%89%E8%A3%85', +}; function buildTarget(locale) { const normalizedLocale = (locale || 'en').toLowerCase(); - const docsLocaleSegment = normalizedLocale.startsWith('zh') ? 'cn' : 'en'; - return `${DOCS_BASE}/${docsLocaleSegment}/ivorysql-doc/${DOCS_VERSION}/3.1#quick-installation`; + return normalizedLocale.startsWith('zh') ? INSTALLATION_URLS.zh : INSTALLATION_URLS.en; } export default function DocsInstallationRedirect() { diff --git a/src/pages/index.js b/src/pages/index.js index 9e6438d0..9582e6d0 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -25,6 +25,10 @@ const INSTALL_CARD_ICONS = [Icon04, Icon01, Icon06]; const RELEASES_URL = 'https://github.com/IvorySQL/IvorySQL/releases'; const ONLINE_TRIAL_URL = 'https://trial.ivorysql.org/'; +const ECOSYSTEM_DOCS_URLS = { + en: 'https://docs.ivorysql.org/en/ivorysql-doc/v5.3/5.0', + zh: 'https://docs.ivorysql.org/cn/ivorysql-doc/v5.3/5.0', +}; /* Trusted-by customer list — logo path optional; nameZh shown in zh locale */ const TRUSTED_CUSTOMERS = [ @@ -598,6 +602,7 @@ export default function Home() { const { siteConfig, i18n } = useDocusaurusContext(); const isZh = i18n.currentLocale.toLowerCase().startsWith('zh'); const content = isZh ? CONTENT.zh : CONTENT.en; + const ecosystemDocsUrl = isZh ? ECOSYSTEM_DOCS_URLS.zh : ECOSYSTEM_DOCS_URLS.en; const [latestVersionLabel, setLatestVersionLabel] = useState(content.latestVersionLabel); const certImages = [ '/img/partners/cert1.jpg', @@ -934,7 +939,7 @@ export default function Home() { {/* View all tools link */}