This is an automated email from the ASF dual-hosted git repository. luzhijing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push: new c3aed0561a8 [fix]fix common-zh link (#969) c3aed0561a8 is described below commit c3aed0561a876c78829394687af6f27e33a6922b Author: 0xFlackoLFG <k9745u...@gmail.com> AuthorDate: Thu Aug 8 15:06:16 2024 +0800 [fix]fix common-zh link (#969) --- src/theme/DocItem/Layout/pathTransfer.ts | 11 +++++------ src/theme/DocSidebar/Desktop/index.tsx | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/theme/DocItem/Layout/pathTransfer.ts b/src/theme/DocItem/Layout/pathTransfer.ts index 4d6369a6ded..9a3fa299930 100644 --- a/src/theme/DocItem/Layout/pathTransfer.ts +++ b/src/theme/DocItem/Layout/pathTransfer.ts @@ -19,17 +19,16 @@ const transformPathWithoutZhCN = (pathname: string): string => { }; const transformPathWithZhCN = (pathname: string): string => { const regex = /^\/zh-CN\/docs\/(?:2\.1|2\.0|1\.2|dev|)/ - console.log(pathname.match(/\/ecosystem\/(.+)$/),'2222222') if (pathname.includes('/gettingStarted')) { - return `/i18n/zh-CN/docusaurus-plugin-content-docs-gettingStarted/current/${pathname.replace(/^\/zh-CN\/docs(?:\/(?:2\.1|2\.0|1\.2|dev))?\/gettingStarted\//,'')}.md`; + return `/common_docs_zh/gettingStarted/${pathname.replace(/^\/zh-CN\/docs(?:\/(?:2\.1|2\.0|1\.2|dev))?\/gettingStarted\//,'')}.md`; } else if (pathname.includes('/ecosystem')) { - return `/i18n/zh-CN/docusaurus-plugin-content-docs-ecosystem/current/${pathname.replace(/^\/zh-CN\/docs(?:\/(?:2\.1|2\.0|1\.2|dev))?\/ecosystem\//,'')}.md`; + return `/common_docs_zh/ecosystem/${pathname.replace(/^\/zh-CN\/docs(?:\/(?:2\.1|2\.0|1\.2|dev))?\/ecosystem\//,'')}.md`; } else if (pathname.includes('/benchmark')) { - return `/i18n/zh-CN/docusaurus-plugin-content-docs-benchmark/current/${pathname.replace(/^\/zh-CN\/docs(?:\/(?:2\.1|2\.0|1\.2|dev))?\/benchmark\//,'')}.md`; + return `/common_docs_zh/benchmark/${pathname.replace(/^\/zh-CN\/docs(?:\/(?:2\.1|2\.0|1\.2|dev))?\/benchmark\//,'')}.md`; } else if (pathname.includes('/faq')) { - return `/i18n/zh-CN/docusaurus-plugin-content-docs-faq/current/${pathname.replace(/^\/zh-CN\/docs(?:\/(?:2\.1|2\.0|1\.2|dev))?\/faq\//,'')}.md`; + return `/common_docs_zh/faq/${pathname.replace(/^\/zh-CN\/docs(?:\/(?:2\.1|2\.0|1\.2|dev))?\/faq\//,'')}.md`; } else if (pathname.includes('/releasenotes')) { - return `/i18n/zh-CN/docusaurus-plugin-content-docs-releases/current/${pathname.replace(/^\/zh-CN\/docs(?:\/(?:2\.1|2\.0|1\.2|dev))?\/releasenotes\//,'')}.md`; + return `/common_docs_zh/releasenotes/${pathname.replace(/^\/zh-CN\/docs(?:\/(?:2\.1|2\.0|1\.2|dev))?\/releasenotes\//,'')}.md`; } else if (pathname.includes('/docs')) { if (pathname.includes('/2.1')) { return `/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1${pathname.replace('/zh-CN/docs/2.1', '')}.md`; diff --git a/src/theme/DocSidebar/Desktop/index.tsx b/src/theme/DocSidebar/Desktop/index.tsx index 451ec115ed4..d5f5b258386 100644 --- a/src/theme/DocSidebar/Desktop/index.tsx +++ b/src/theme/DocSidebar/Desktop/index.tsx @@ -16,7 +16,6 @@ function DocSidebarDesktop({ path, sidebar, onCollapse, isHidden }) { sidebar: { hideable }, }, } = useThemeConfig(); - console.log(sidebar,'sidebar') const hasLearningPath = path.includes('/docs'); return ( <div className={clsx('sidebar ', hideOnScroll && 'sidebar-with-hideable-navbar', isHidden && 'sidebar-hidden')}> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org