feat: Enable API search (#353)

* enabled search in ref and changed from section -> main so Algolia will index ref content

* fix: algolia apu key
This commit is contained in:
Kasper Fabricius Kristensen
2021-08-25 15:51:00 +02:00
committed by GitHub
parent f76aa816a5
commit 15161bb0e9
6 changed files with 16 additions and 14 deletions
+2 -4
View File
@@ -2,12 +2,10 @@ import React from "react"
import { DocSearch } from "@docsearch/react"
import "../../medusa-plugin-themes/docsearch/theme.css"
const algoliaApiKey =
process.env.ALGOLIA_API_KEY || "25626fae796133dc1e734c6bcaaeac3c" //second opt is for testing purposes
const algoliaIndexName = process.env.ALGOLIA_API_KEY || "docsearch"
const algoliaApiKey = process.env.ALGOLIA_API_KEY || "temp"
const Search = () => {
return <DocSearch apiKey={algoliaApiKey} indexName={algoliaIndexName} />
return <DocSearch apiKey={algoliaApiKey} indexName="medusa-commerce" />
}
export default Search