aboutsummaryrefslogtreecommitdiff
path: root/examples/docs/src/components/Header/Search.tsx
diff options
context:
space:
mode:
authorGravatar Fred K. Schott <fkschott@gmail.com> 2021-08-26 15:02:38 -0700
committerGravatar Fred K. Schott <fkschott@gmail.com> 2021-08-26 15:03:21 -0700
commit2e8db7ad2384b756894eac6be72bcf720f7f28fa (patch)
tree074ff88116520c3484210a0b94331b0f2b81581b /examples/docs/src/components/Header/Search.tsx
parentb7ada11ddbabe4dd2f0798e140e5b280de4d6952 (diff)
downloadastro-2e8db7ad2384b756894eac6be72bcf720f7f28fa.tar.gz
astro-2e8db7ad2384b756894eac6be72bcf720f7f28fa.tar.zst
astro-2e8db7ad2384b756894eac6be72bcf720f7f28fa.zip
add algolia and cleanup docs readme
Diffstat (limited to 'examples/docs/src/components/Header/Search.tsx')
-rw-r--r--examples/docs/src/components/Header/Search.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/docs/src/components/Header/Search.tsx b/examples/docs/src/components/Header/Search.tsx
index d842e007f..19ee513f1 100644
--- a/examples/docs/src/components/Header/Search.tsx
+++ b/examples/docs/src/components/Header/Search.tsx
@@ -2,7 +2,8 @@
import { useState, useCallback, useRef } from 'react';
import { createPortal } from 'react-dom';
import { DocSearchModal, useDocSearchKeyboardEvents } from '@docsearch/react';
-import '@docsearch/css//dist/style.css';
+import * as CONFIG from '../../config.js';
+import '@docsearch/css/dist/style.css';
import './Search.css';
export default function Search() {
@@ -53,8 +54,8 @@ export default function Search() {
initialQuery={initialQuery}
initialScrollY={window.scrollY}
onClose={onClose}
- indexName="astro"
- apiKey="0f387260ad74f9cbf4353facd29c919c"
+ indexName={(CONFIG as any).ALGOLIA.indexName}
+ apiKey={(CONFIG as any).ALGOLIA.apiKey}
transformItems={(items) => {
return items.map((item) => {
// We transform the absolute URL into a relative URL to