This is an automated email from the ASF dual-hosted git repository. urfree pushed a commit to branch upgrade-docusaurus-to-2.0.1 in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
commit 0e34eb3ee186d6cab04efa3e84948bf5c96a593d Author: Li Li <[email protected]> AuthorDate: Thu Sep 1 09:30:30 2022 +0800 update docusaurus to 2.0.1 Signed-off-by: Li Li <[email protected]> --- site2/website-next/package.json | 8 +++---- .../src/theme/DocSidebar/Desktop/index.js | 26 +++++++++------------- .../src/theme/DocSidebar/Desktop/styles.module.css | 7 ------ .../src/theme/DocSidebar/Mobile/index.js | 17 +++++--------- site2/website-next/src/theme/DocSidebar/index.js | 14 ++++-------- .../static/swagger/restApiVersions.json | 6 ++--- 6 files changed, 27 insertions(+), 51 deletions(-) diff --git a/site2/website-next/package.json b/site2/website-next/package.json index 09875d3a700..0f7fb9942cd 100644 --- a/site2/website-next/package.json +++ b/site2/website-next/package.json @@ -22,10 +22,10 @@ }, "dependencies": { "@crowdin/cli": "3.7.4", - "@docusaurus/core": "2.0.0-beta.21", - "@docusaurus/plugin-client-redirects": "2.0.0-beta.21", - "@docusaurus/plugin-google-analytics": "2.0.0-beta.21", - "@docusaurus/preset-classic": "2.0.0-beta.21", + "@docusaurus/core": "2.0.1", + "@docusaurus/plugin-client-redirects": "2.0.1", + "@docusaurus/plugin-google-analytics": "2.0.1", + "@docusaurus/preset-classic": "2.0.1", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@mdx-js/react": "^1.6.22", diff --git a/site2/website-next/src/theme/DocSidebar/Desktop/index.js b/site2/website-next/src/theme/DocSidebar/Desktop/index.js index 6b93f8889ee..4803741be22 100644 --- a/site2/website-next/src/theme/DocSidebar/Desktop/index.js +++ b/site2/website-next/src/theme/DocSidebar/Desktop/index.js @@ -1,16 +1,10 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import React from "react"; -import clsx from "clsx"; -import { useThemeConfig } from "@docusaurus/theme-common"; -import Logo from "@theme/Logo"; -import CollapseButton from "@theme/DocSidebar/Desktop/CollapseButton"; -import Content from "@theme/DocSidebar/Desktop/Content"; -import styles from "./styles.module.css"; +import React from 'react'; +import clsx from 'clsx'; +import {useThemeConfig} from '@docusaurus/theme-common'; +import Logo from '@theme/Logo'; +import CollapseButton from '@theme/DocSidebar/Desktop/CollapseButton'; +import Content from '@theme/DocSidebar/Desktop/Content'; +import styles from './styles.module.css'; import DocsVersionDropdownNavbarItem from "../../DocsVersionDropdownNavbarItem"; function DocSidebarDesktop({ @@ -22,7 +16,9 @@ function DocSidebarDesktop({ }) { const { navbar: { hideOnScroll }, - hideableSidebar, + docs: { + sidebar: { hideable }, + }, } = useThemeConfig(); return ( <div @@ -39,7 +35,7 @@ function DocSidebarDesktop({ <></> )} <Content path={path} sidebar={sidebar} /> - {hideableSidebar && <CollapseButton onClick={onCollapse} />} + {hideable && <CollapseButton onClick={onCollapse} />} </div> ); } diff --git a/site2/website-next/src/theme/DocSidebar/Desktop/styles.module.css b/site2/website-next/src/theme/DocSidebar/Desktop/styles.module.css index 16d3c38c4a8..be1391404ef 100644 --- a/site2/website-next/src/theme/DocSidebar/Desktop/styles.module.css +++ b/site2/website-next/src/theme/DocSidebar/Desktop/styles.module.css @@ -1,10 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - @media (min-width: 997px) { .sidebar { display: flex; diff --git a/site2/website-next/src/theme/DocSidebar/Mobile/index.js b/site2/website-next/src/theme/DocSidebar/Mobile/index.js index 43a0c708942..2bbe733fdaa 100644 --- a/site2/website-next/src/theme/DocSidebar/Mobile/index.js +++ b/site2/website-next/src/theme/DocSidebar/Mobile/index.js @@ -1,17 +1,11 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import React from "react"; -import clsx from "clsx"; +import React from 'react'; +import clsx from 'clsx'; import { NavbarSecondaryMenuFiller, ThemeClassNames, - useNavbarMobileSidebar, -} from "@docusaurus/theme-common"; -import DocSidebarItems from "@theme/DocSidebarItems"; +} from '@docusaurus/theme-common'; +import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal'; +import DocSidebarItems from '@theme/DocSidebarItems'; import styles from "./styles.module.css"; import DocsVersionDropdownNavbarItem from "../../DocsVersionDropdownNavbarItem"; import BrowserOnly from "@docusaurus/BrowserOnly"; @@ -30,7 +24,6 @@ const DocSidebarMobileSecondaryMenu = ({ sidebar, path, docsPluginId }) => { if (item.type === "category" && item.href) { mobileSidebar.toggle(); } - if (item.type === "link") { mobileSidebar.toggle(); } diff --git a/site2/website-next/src/theme/DocSidebar/index.js b/site2/website-next/src/theme/DocSidebar/index.js index a84c73a23f0..d0f4e7e759d 100644 --- a/site2/website-next/src/theme/DocSidebar/index.js +++ b/site2/website-next/src/theme/DocSidebar/index.js @@ -1,19 +1,13 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ import React from 'react'; import {useWindowSize} from '@docusaurus/theme-common'; import DocSidebarDesktop from '@theme/DocSidebar/Desktop'; import DocSidebarMobile from '@theme/DocSidebar/Mobile'; export default function DocSidebar(props) { - const windowSize = useWindowSize(); // Desktop sidebar visible on hydration: need SSR rendering - + const windowSize = useWindowSize(); + // Desktop sidebar visible on hydration: need SSR rendering const shouldRenderSidebarDesktop = - windowSize === 'desktop' || windowSize === 'ssr'; // Mobile sidebar not visible on hydration: can avoid SSR rendering - + windowSize === 'desktop' || windowSize === 'ssr'; + // Mobile sidebar not visible on hydration: can avoid SSR rendering const shouldRenderSidebarMobile = windowSize === 'mobile'; return ( <> diff --git a/site2/website-next/static/swagger/restApiVersions.json b/site2/website-next/static/swagger/restApiVersions.json index 8d35bd4d0b0..99fe6744dc6 100644 --- a/site2/website-next/static/swagger/restApiVersions.json +++ b/site2/website-next/static/swagger/restApiVersions.json @@ -49,7 +49,7 @@ ] } ], - "2.3.1": [ + "2.4.0": [ { "version": "v2", "fileName": [ @@ -65,7 +65,7 @@ ] } ], - "2.3.2": [ + "2.3.1": [ { "version": "v2", "fileName": [ @@ -81,7 +81,7 @@ ] } ], - "2.4.0": [ + "2.3.2": [ { "version": "v2", "fileName": [
