mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Move DocSearch key to env var [ci skip]
This commit is contained in:
parent
d410d95b52
commit
1252370f69
|
@ -23,7 +23,6 @@
|
||||||
},
|
},
|
||||||
"docSearch": {
|
"docSearch": {
|
||||||
"appId": "Y1LB128RON",
|
"appId": "Y1LB128RON",
|
||||||
"apiKey": "bb601a1daab73e2dc66faf2b79564807",
|
|
||||||
"indexName": "spacy"
|
"indexName": "spacy"
|
||||||
},
|
},
|
||||||
"binderUrl": "explosion/spacy-io-binder",
|
"binderUrl": "explosion/spacy-io-binder",
|
||||||
|
|
|
@ -32,6 +32,9 @@ const nextConfig = withPWA(
|
||||||
ignoreBuildErrors: true,
|
ignoreBuildErrors: true,
|
||||||
},
|
},
|
||||||
images: { unoptimized: true },
|
images: { unoptimized: true },
|
||||||
|
env: {
|
||||||
|
DOCSEARCH_API_KEY: process.env.DOCSEARCH_API_KEY
|
||||||
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useEffect, useState } from 'react'
|
import React from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { DocSearch } from '@docsearch/react'
|
import { DocSearch } from '@docsearch/react'
|
||||||
import '@docsearch/css'
|
import '@docsearch/css'
|
||||||
|
@ -6,7 +6,8 @@ import '@docsearch/css'
|
||||||
import siteMetadata from '../../meta/site.json'
|
import siteMetadata from '../../meta/site.json'
|
||||||
|
|
||||||
export default function Search({ placeholder = 'Search docs' }) {
|
export default function Search({ placeholder = 'Search docs' }) {
|
||||||
const { apiKey, indexName, appId } = siteMetadata.docSearch
|
const apiKey = process.env.DOCSEARCH_API_KEY
|
||||||
|
const { indexName, appId } = siteMetadata.docSearch
|
||||||
return (
|
return (
|
||||||
<DocSearch appId={appId} indexName={indexName} apiKey={apiKey} placeholder={placeholder} />
|
<DocSearch appId={appId} indexName={indexName} apiKey={apiKey} placeholder={placeholder} />
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user