mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-15 18:17:35 +02:00
feat(): add appId into algoliaConfig (#481)
This commit is contained in:
parent
4553afda2b
commit
4ea8158c0c
1 changed files with 10 additions and 0 deletions
|
@ -124,6 +124,11 @@ class Site extends React.Component {
|
|||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
var search = docsearch({
|
||||
${
|
||||
this.props.config.algolia.appId
|
||||
? `appId: '${this.props.config.algolia.appId}',`
|
||||
: ''
|
||||
}
|
||||
apiKey: '${this.props.config.algolia.apiKey}',
|
||||
indexName: '${this.props.config.algolia.indexName}',
|
||||
inputSelector: '#search_input_react',
|
||||
|
@ -141,6 +146,11 @@ class Site extends React.Component {
|
|||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
var search = docsearch({
|
||||
${
|
||||
this.props.config.algolia.appId
|
||||
? `appId: '${this.props.config.algolia.appId}',`
|
||||
: ''
|
||||
}
|
||||
apiKey: '${this.props.config.algolia.apiKey}',
|
||||
indexName: '${this.props.config.algolia.indexName}',
|
||||
inputSelector: '#search_input_react'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue