diff --git a/docs/docusaurus/docusaurus.config.ts b/docs/docusaurus/docusaurus.config.ts index db497e748f..7390918c6f 100644 --- a/docs/docusaurus/docusaurus.config.ts +++ b/docs/docusaurus/docusaurus.config.ts @@ -47,10 +47,10 @@ const config: Config = { // routeBasePath: "zh/latest", // }, docs: { - id: "4-5-0_zh", - sidebarPath: "./versions_sidebars/version-4.5.0_zh.ts", - path: "./versions/version-4.5.0/zh-CN/source", - routeBasePath: "zh/4.5.0", + id: "4-5-1_zh", + sidebarPath: "./versions_sidebars/version-4.5.1_zh.ts", + path: "./versions/version-4.5.1/zh-CN/source", + routeBasePath: "zh/4.5.1", }, theme: { customCss: "./src/css/custom.css", @@ -72,10 +72,10 @@ const config: Config = { [ "content-docs", { - id: "4-5-0_en", - sidebarPath: "./versions_sidebars/version-4.5.0_en.ts", - path: "./versions/version-4.5.0/en-US/source", - routeBasePath: "en/4.5.0", + id: "4-5-1_en", + sidebarPath: "./versions_sidebars/version-4.5.1_en.ts", + path: "./versions/version-4.5.1/en-US/source", + routeBasePath: "en/4.5.1", editCurrentVersion: false, } satisfies DocsOptions, ], @@ -199,26 +199,7 @@ const config: Config = { editCurrentVersion: false, } satisfies DocsOptions, ], - [ - "content-docs", - { - id: "4-0-0_en", - sidebarPath: "./versions_sidebars/version-4.0.0_en.ts", - path: "./versions/version-4.0.0/en-US/source", - routeBasePath: "en/4.0.0", - editCurrentVersion: false, - } satisfies DocsOptions, - ], - [ - "content-docs", - { - id: "4-0-0_zh", - sidebarPath: "./versions_sidebars/version-4.0.0_zh.ts", - path: "./versions/version-4.0.0/zh-CN/source", - routeBasePath: "zh/4.0.0", - editCurrentVersion: false, - } satisfies DocsOptions, - ], + [ "content-docs", { @@ -259,26 +240,6 @@ const config: Config = { editCurrentVersion: false, } satisfies DocsOptions, ], - [ - "content-docs", - { - id: "3-5-0_en", - sidebarPath: "./versions_sidebars/version-3.5.0_en.ts", - path: "./versions/version-3.5.0/en-US/source", - routeBasePath: "en/3.5.0", - editCurrentVersion: false, - } satisfies DocsOptions, - ], - [ - "content-docs", - { - id: "3-5-0_zh", - sidebarPath: "./versions_sidebars/version-3.5.0_zh.ts", - path: "./versions/version-3.5.0/zh-CN/source", - routeBasePath: "zh/3.5.0", - editCurrentVersion: false, - } satisfies DocsOptions, - ], ], themeConfig: { @@ -313,12 +274,12 @@ const config: Config = { headTags: [ { - tagName: 'meta', + tagName: "meta", attributes: { - name: 'algolia-site-verification', - content: 'FC204AA054194DE3', + name: "algolia-site-verification", + content: "FC204AA054194DE3", }, - } + }, ], }; diff --git a/docs/docusaurus/src/constants/index.ts b/docs/docusaurus/src/constants/index.ts index aadaf86c3f..3b51498ebe 100644 --- a/docs/docusaurus/src/constants/index.ts +++ b/docs/docusaurus/src/constants/index.ts @@ -107,17 +107,15 @@ const ZH_NOT_FOUND_CONFIG = { }; const versions = [ - "4.5.0", + "4.5.1", "4.3.2", "4.3.1", "4.3.0", "4.2.0", "4.1.0", "4.0.1", - "4.0.0", "3.6.0", "3.5.1", - "3.5.0", ]; const EN_DOC_OPTIONS = [ @@ -130,11 +128,6 @@ const EN_DOC_OPTIONS = [ label: "TuGraph Analytics Streaming Graph Computing Engine", value: "TuGraph_Analytics", }, - { - label: "TuGraph Learn Graph Learning Engine", - value: "TuGraph_Learn", - children: versions.slice(0, 5).map((item) => ({ value: item, label: item })), - }, ]; const ZH_DOC_OPTIONS = [ @@ -147,11 +140,6 @@ const ZH_DOC_OPTIONS = [ label: "TuGraph Analytics 实时图计算引擎", value: "TuGraph_Analytics", }, - { - label: "TuGraph Learn 图学习引擎", - value: "TuGraph_Learn", - children: versions.slice(0, 5).map((item) => ({ value: item, label: item })), - }, ]; export { diff --git a/docs/docusaurus/src/pages/index.tsx b/docs/docusaurus/src/pages/index.tsx index 246e021167..d1cbc59745 100644 --- a/docs/docusaurus/src/pages/index.tsx +++ b/docs/docusaurus/src/pages/index.tsx @@ -1,16 +1,16 @@ -import clsx from 'clsx'; -import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Layout from '@theme/Layout'; -import HomepageFeatures from '@site/src/components/HomepageFeatures'; -import Heading from '@theme/Heading'; +import clsx from "clsx"; +import Link from "@docusaurus/Link"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import Layout from "@theme/Layout"; +import HomepageFeatures from "@site/src/components/HomepageFeatures"; +import Heading from "@theme/Heading"; -import styles from './index.module.css'; +import styles from "./index.module.css"; function HomepageHeader() { - const {siteConfig} = useDocusaurusContext(); + const { siteConfig } = useDocusaurusContext(); return ( -
+
{siteConfig.title} @@ -18,8 +18,11 @@ function HomepageHeader() {

{siteConfig.tagline}

Get Started @@ -30,11 +33,12 @@ function HomepageHeader() { } export default function Home(): JSX.Element { - const {siteConfig} = useDocusaurusContext(); + const { siteConfig } = useDocusaurusContext(); return ( + description="Description will go into a meta tag in " + >
diff --git a/docs/docusaurus/src/theme/DocSidebar/index.tsx b/docs/docusaurus/src/theme/DocSidebar/index.tsx index 4b640d0862..aec4089f6f 100644 --- a/docs/docusaurus/src/theme/DocSidebar/index.tsx +++ b/docs/docusaurus/src/theme/DocSidebar/index.tsx @@ -21,17 +21,15 @@ export default function DocSidebarWrapper(props: Props): JSX.Element { const { pathname } = location; const languages = ["en", "zh"]; const versions = [ - "4.5.0", + "4.5.1", "4.3.2", "4.3.1", "4.3.0", "4.2.0", "4.1.0", "4.0.1", - "4.0.0", "3.6.0", "3.5.1", - "3.5.0", ]; const getCurrentLanguage = () => { @@ -50,7 +48,7 @@ export default function DocSidebarWrapper(props: Props): JSX.Element { ) { return { label: segments[versionIndex], value: segments[versionIndex] }; } - return { label: "4.5.0", value: "4.5.0" }; + return { label: "4.5.1", value: "4.5.1" }; }; const formatDocSearchVersion = (tag: string) => { @@ -96,12 +94,6 @@ export default function DocSidebarWrapper(props: Props): JSX.Element { history.push(newPath); }; - const getCurrentType = () => { - return pathname.includes("/olap&procedure/learn") - ? "TuGraph_Learn" - : "TuGraph_DB"; - }; - const navigator = useRef({ navigate({ itemUrl }: { itemUrl?: string }) { history.push(itemUrl!); @@ -153,21 +145,10 @@ export default function DocSidebarWrapper(props: Props): JSX.Element { }; const getDescByLanguage = (lang: string) => { - const type = getCurrentType(); - const desc = - type === "TuGraph_Learn" - ? { - zh: "图学习引擎", - en: "Graph Learning Engine", - } - : { - zh: "社区版", - en: "Community", - }; if (lang === "zh") { - return desc.zh; + return "社区版"; } - return desc.en; + return "Community"; }; const getOptions = (lang: string) => { @@ -214,12 +195,6 @@ export default function DocSidebarWrapper(props: Props): JSX.Element { }; }, []); - const getCascaderTitle = () => { - const type = getCurrentType(); - - return type === "TuGraph_Learn" ? "TuGraph Learn" : "TuGraph DB"; - }; - return (
- {getCascaderTitle()} + TuGraph DB
@@ -258,7 +233,10 @@ export default function DocSidebarWrapper(props: Props): JSX.Element {
- +