diff options
author | 2021-08-26 15:02:38 -0700 | |
---|---|---|
committer | 2021-08-26 15:03:21 -0700 | |
commit | 2e8db7ad2384b756894eac6be72bcf720f7f28fa (patch) | |
tree | 074ff88116520c3484210a0b94331b0f2b81581b /examples/docs/src/components/Header/Search.tsx | |
parent | b7ada11ddbabe4dd2f0798e140e5b280de4d6952 (diff) | |
download | astro-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.tsx | 7 |
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 |