Skip to content

Commit

Permalink
feat(): add appId into algoliaConfig (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
atroncy authored and JoelMarcey committed Mar 4, 2018
1 parent 4553afd commit 4ea8158
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/core/Site.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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'
Expand Down

0 comments on commit 4ea8158

Please sign in to comment.