Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs-website): bump docusaurus to v2.1.0 #5792

Merged
merged 8 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions docs-website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,6 @@ module.exports = {
isSaas: isSaas,
},
themeConfig: {
colorMode: {
switchConfig: {
darkIcon: " ",
darkIconStyle: {
backgroundImage: `url("data:image/svg+xml,%3Csvg width='18' height='18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.556 9.784A6.065 6.065 0 0 1 14 9.987a5.948 5.948 0 0 1-4.235-1.752 6.02 6.02 0 0 1-1.548-5.792.75.75 0 0 0-.918-.917A7.51 7.51 0 0 0 3.93 3.462c-2.924 2.924-2.924 7.682 0 10.607a7.453 7.453 0 0 0 5.304 2.198c2.003 0 3.886-.78 5.302-2.197a7.505 7.505 0 0 0 1.937-3.368.75.75 0 0 0-.918-.918Zm-2.079 3.225a5.96 5.96 0 0 1-4.242 1.758 5.964 5.964 0 0 1-4.243-1.758 6.009 6.009 0 0 1 0-8.486 5.942 5.942 0 0 1 1.545-1.112 7.52 7.52 0 0 0 2.167 5.886 7.479 7.479 0 0 0 5.886 2.168 6.026 6.026 0 0 1-1.113 1.544Z' fill='%23fff' opacity='.5'/%3E%3C/svg%3E")`,
width: "18px",
height: "18px",
margin: "-4px 0 0 -4px",
},
lightIcon: " ",
lightIconStyle: {
backgroundImage: `url("data:image/svg+xml,%3Csvg width='18' height='18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg opacity='.5' fill='%23fff'%3E%3Cpath d='M5.245 9A3.76 3.76 0 0 0 9 12.755 3.76 3.76 0 0 0 12.755 9 3.76 3.76 0 0 0 9 5.245 3.76 3.76 0 0 0 5.245 9ZM9 6.745A2.258 2.258 0 0 1 11.255 9 2.258 2.258 0 0 1 9 11.255 2.258 2.258 0 0 1 6.745 9 2.258 2.258 0 0 1 9 6.745Zm-.752 7.505h1.5v2.25h-1.5v-2.25Zm0-12.75h1.5v2.25h-1.5V1.5Zm-6.75 6.75h2.25v1.5h-2.25v-1.5Zm12.75 0h2.25v1.5h-2.25v-1.5ZM3.164 13.773l1.59-1.592 1.062 1.06-1.59 1.592-1.062-1.06ZM12.18 4.758l1.592-1.592 1.06 1.06-1.591 1.592-1.06-1.06ZM4.756 5.819l-1.59-1.592 1.06-1.06L5.818 4.76l-1.06 1.06ZM14.832 13.773l-1.06 1.06-1.592-1.591 1.06-1.06 1.592 1.59Z'/%3E%3C/g%3E%3C/svg%3E")`,
width: "18px",
height: "18px",
margin: "-4px 0 0 -4px",
},
},
},
...(!isSaas && {
announcementBar: {
id: "announcement",
Expand Down
6 changes: 3 additions & 3 deletions docs-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
},
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@docusaurus/core": "^2.0.0-beta.7",
"@docusaurus/plugin-ideal-image": "2.0.0-beta.8",
"@docusaurus/preset-classic": "^2.0.0-beta.7",
"@docusaurus/core": "^2.1.0",
"@docusaurus/plugin-ideal-image": "^2.1.0",
"@docusaurus/preset-classic": "^2.1.0",
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^3.5.1",
"@octokit/rest": "^18.6.2",
Expand Down
22 changes: 11 additions & 11 deletions docs-website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ module.exports = {
],
},

{
"Shift Left": [
// "docs/wip/importance-of-shift-left",
],
},
// {
// "Shift Left": [
// // "docs/wip/importance-of-shift-left",
// ],
// },
{
Sources: [
// collapse these; add push-based at top
Expand Down Expand Up @@ -453,12 +453,12 @@ module.exports = {
// "docs/wip/ui-ingestion-guide", -- not needed
// "docs/wip/personal-access-tokens-guide", -- not needed

{
"Advanced Tutorials": [
// "docs/wip/advanced-guides",
// "docs/wip/search-ranking",
],
},
// {
// "Advanced Tutorials": [
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maggiehays fyi - these sections weren't showing up in the sidebar before either, but now docusaurus complains about them so I commented them out

// // "docs/wip/advanced-guides",
// // "docs/wip/search-ranking",
// ],
// },
],

"Join the Community": [
Expand Down
4 changes: 2 additions & 2 deletions docs-website/src/pages/_components/Hero/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import clsx from "clsx";
import Link from "@docusaurus/Link";
import useBaseUrl from "@docusaurus/useBaseUrl";
import Image from "@theme/IdealImage";
import useThemeContext from "@theme/hooks/useThemeContext";
import { useColorMode } from "@docusaurus/theme-common";
import { QuestionCircleOutlined } from "@ant-design/icons";
import styles from "./hero.module.scss";

Expand All @@ -19,7 +19,7 @@ const HeroAnnouncement = ({ message, linkUrl, linkText }) => (
);

const Hero = ({}) => {
const { isDarkTheme } = useThemeContext();
const { isDarkTheme } = useColorMode();
return (
<header className={clsx("hero", styles.hero)}>
<div className="container">
Expand Down
10 changes: 5 additions & 5 deletions docs-website/src/pages/docs/_components/SearchBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import clsx from "clsx";

import Link from "@docusaurus/Link";
import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment";
import { usePluralForm, useDynamicCallback } from "@docusaurus/theme-common";
import { usePluralForm, useEvent } from "@docusaurus/theme-common";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import { useAllDocsData } from "@theme/hooks/useDocs";
import useSearchQuery from "@theme/hooks/useSearchQuery";
import { useAllDocsData } from "@docusaurus/plugin-content-docs/client";
import { useSearchPage } from "@docusaurus/theme-common/internal";
import Translate, { translate } from "@docusaurus/Translate";
import styles from "./search.module.scss";

Expand Down Expand Up @@ -103,7 +103,7 @@ function SearchBar() {
const documentsFoundPlural = useDocumentsFoundPlural();

const docsSearchVersionsHelpers = useDocsSearchVersionsHelpers();
const { searchQuery, setSearchQuery } = useSearchQuery();
const { searchQuery, setSearchQuery } = useSearchPage()
const initialSearchResultState = {
items: [],
query: null,
Expand Down Expand Up @@ -229,7 +229,7 @@ function SearchBar() {
description: "The search page title for empty query",
});

const makeSearch = useDynamicCallback((page = 0) => {
const makeSearch = useEvent((page = 0) => {
algoliaHelper.addDisjunctiveFacetRefinement("docusaurus_tag", "default");
algoliaHelper.addDisjunctiveFacetRefinement("language", currentLocale);

Expand Down
Loading