mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 10:16:27 +03:00
Use dev DocSearch index
This commit is contained in:
parent
8af7d01382
commit
fa0f501165
|
@ -23,6 +23,11 @@
|
||||||
"list": "89ad33e698"
|
"list": "89ad33e698"
|
||||||
},
|
},
|
||||||
"docSearch": {
|
"docSearch": {
|
||||||
|
"apiKey": "f7dbcd148fae73db20b6ad33d03cc9e8",
|
||||||
|
"indexName": "dev_spacy_netlify",
|
||||||
|
"appId": "Y7BGGRAPHC"
|
||||||
|
},
|
||||||
|
"_docSearch": {
|
||||||
"apiKey": "371e26ed49d29a27bd36273dfdaf89af",
|
"apiKey": "371e26ed49d29a27bd36273dfdaf89af",
|
||||||
"indexName": "spacy"
|
"indexName": "spacy"
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,12 +6,13 @@ import Icon from './icon'
|
||||||
import classes from '../styles/search.module.sass'
|
import classes from '../styles/search.module.sass'
|
||||||
|
|
||||||
const Search = ({ id, placeholder, settings }) => {
|
const Search = ({ id, placeholder, settings }) => {
|
||||||
const { apiKey, indexName } = settings
|
const { apiKey, indexName, appId } = settings
|
||||||
const [initialized, setInitialized] = useState(false)
|
const [initialized, setInitialized] = useState(false)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
setInitialized(true)
|
setInitialized(true)
|
||||||
window.docsearch({
|
window.docsearch({
|
||||||
|
appId,
|
||||||
apiKey,
|
apiKey,
|
||||||
indexName,
|
indexName,
|
||||||
inputSelector: `#${id}`,
|
inputSelector: `#${id}`,
|
||||||
|
|
|
@ -191,6 +191,7 @@ export const pageQuery = graphql`
|
||||||
docSearch {
|
docSearch {
|
||||||
apiKey
|
apiKey
|
||||||
indexName
|
indexName
|
||||||
|
appId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user