Skip to content

Commit

Permalink
Merge branch 'master' into spark-smoke-test-fix-1
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Sep 4, 2023
2 parents b229c2f + 065a290 commit 4e2f3cf
Show file tree
Hide file tree
Showing 5 changed files with 2,772 additions and 2,729 deletions.
11 changes: 6 additions & 5 deletions docs-website/generateDocsDir.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { execSync } from "child_process";
import * as matter from "gray-matter";
import matter from "gray-matter";
import * as fs from "fs";
import * as path from "path";
import { Octokit } from "@octokit/rest";
Expand All @@ -26,7 +26,7 @@ const sidebars_text = fs.readFileSync(SIDEBARS_DEF_PATH).toString();
const MyOctokit = Octokit.plugin(retry).plugin(throttling);
const octokit = new MyOctokit({
throttle: {
onRateLimit: (retryAfter, options) => {
onRateLimit: (retryAfter: number, options: any) => {
// Retry twice after rate limit is hit.
if (options.request.retryCount <= 2) {
return true;
Expand Down Expand Up @@ -157,7 +157,7 @@ function get_slug(filepath: string): string {
// There's no need to do this cleanup, but it does make the URLs a bit more aesthetic.

if (filepath in hardcoded_slugs) {
return hardcoded_slugs[filepath];
return hardcoded_slugs[filepath as keyof typeof hardcoded_slugs];
}

let slug = get_id(filepath);
Expand Down Expand Up @@ -218,9 +218,10 @@ function markdown_guess_title(

let title: string;
if (filepath in hardcoded_titles) {
title = hardcoded_titles[filepath];
title = hardcoded_titles[filepath as keyof typeof hardcoded_titles];
if (filepath in hardcoded_descriptions) {
contents.data.description = hardcoded_descriptions[filepath];
contents.data.description =
hardcoded_descriptions[filepath as keyof typeof hardcoded_descriptions];
}
if (hardcoded_hide_title.includes(filepath)) {
contents.data.hide_title = true;
Expand Down
10 changes: 5 additions & 5 deletions docs-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
},
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@docusaurus/core": "^2.1.0",
"@docusaurus/plugin-content-docs": "^2.1.0",
"@docusaurus/plugin-ideal-image": "^2.1.0",
"@docusaurus/preset-classic": "^2.1.0",
"@docusaurus/core": "^2.4.1",
"@docusaurus/plugin-content-docs": "2.4.1",
"@docusaurus/plugin-ideal-image": "^2.4.1",
"@docusaurus/preset-classic": "^2.4.1",
"@markprompt/react": "^0.3.5",
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^3.5.1",
Expand Down Expand Up @@ -55,7 +55,7 @@
},
"devDependencies": {
"prettier": "^2.3.0",
"ts-node": "^9.1.1",
"ts-node": "^10.9.1",
"typescript": "^4.1.5"
}
}
5 changes: 3 additions & 2 deletions docs-website/src/pages/docs/_components/SearchBar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment";
import { usePluralForm, useEvent } from "@docusaurus/theme-common";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import { useAllDocsData } from "@docusaurus/plugin-content-docs/client";
import { useSearchPage } from "@docusaurus/theme-common/internal";
import { useSearchQueryString } from '@docusaurus/theme-common';
import {useTitleFormatter} from '@docusaurus/theme-common/internal';
import Translate, { translate } from "@docusaurus/Translate";
import styles from "./search.module.scss";

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

const docsSearchVersionsHelpers = useDocsSearchVersionsHelpers();
const { searchQuery, setSearchQuery } = useSearchPage()
const [searchQuery, setSearchQuery] = useSearchQueryString();
const initialSearchResultState = {
items: [],
query: null,
Expand Down
Loading

0 comments on commit 4e2f3cf

Please sign in to comment.