Skip to content

Commit 264b16d

Browse files
authored
Add Algolia env vars (openapi-ts#1096)
1 parent 46e348d commit 264b16d

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

docs/src/components/Header/Search.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/** @jsxImportSource react */
22
import { useState, useCallback, useRef } from "react";
3-
import { ALGOLIA } from "../../consts";
43
import "@docsearch/css";
54
import "./Search.css";
65

@@ -71,9 +70,9 @@ export default function Search() {
7170
initialQuery={initialQuery}
7271
initialScrollY={window.scrollY}
7372
onClose={onClose}
74-
indexName={ALGOLIA.indexName}
75-
appId={ALGOLIA.appId}
76-
apiKey={ALGOLIA.apiKey}
73+
indexName={import.meta.env.ALGOLIA_INDEX_NAME}
74+
appId={import.meta.env.ALGOLIA_APP_ID}
75+
apiKey={import.meta.env.ALGOLIA_SEARCH_KEY}
7776
transformItems={(items) => {
7877
return items.map((item) => {
7978
// We transform the absolute URL into a relative URL to

docs/src/consts.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ export const KNOWN_LANGUAGES = {
1717
} as const;
1818
export const KNOWN_LANGUAGE_CODES = Object.values(KNOWN_LANGUAGES);
1919

20-
// See "Algolia" section of the README for more information.
21-
export const ALGOLIA = {
22-
indexName: "XXXXXXXXXX",
23-
appId: "XXXXXXXXXX",
24-
apiKey: "XXXXXXXXXX",
25-
};
26-
2720
export const OPENAPI_TS_CONTRIBUTORS = [
2821
...new Set([
2922
"drwpow",

0 commit comments

Comments
 (0)