diff --git a/lib/core/Site.js b/lib/core/Site.js index 6506e0ed74a5..2a0cbed81631 100644 --- a/lib/core/Site.js +++ b/lib/core/Site.js @@ -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'