From 2e8db7ad2384b756894eac6be72bcf720f7f28fa Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Thu, 26 Aug 2021 15:02:38 -0700 Subject: add algolia and cleanup docs readme --- examples/docs/src/components/Header/Search.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'examples/docs/src/components/Header/Search.tsx') 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 -- cgit v1.2.3