-
Notifications
You must be signed in to change notification settings - Fork 784
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from alisonjoseph/config-updates
feat: enable search add favicon
- Loading branch information
Showing
5 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { useEffect } from 'react'; | ||
|
||
const useAlgoliaSearch = () => { | ||
useEffect(() => { | ||
if ( | ||
typeof window === `undefined` || | ||
typeof window.docsearch === `undefined` | ||
) { | ||
console.warn(`Search has failed to load and now is being disabled`); | ||
} else { | ||
window.docsearch({ | ||
apiKey: `296ea0c1d0e96b2b04900d0f4d1a6329`, | ||
indexName: `carbondesignsystem`, | ||
inputSelector: `#doc-search`, | ||
// set this to true if you need to debug css | ||
debug: true, | ||
}); | ||
} | ||
}); | ||
}; | ||
|
||
export default useAlgoliaSearch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
097dac0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully aliased the URL https://carbondesignsystem-r4l37bpdd.now.sh to the following aliases: