-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d64486
commit e90693a
Showing
4 changed files
with
17 additions
and
20 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
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 |
---|---|---|
@@ -1,21 +1,16 @@ | ||
{{/* partial "cookies-popup.html" . */}} | ||
{{ partial "javascript.html" . }} | ||
{{ if eq (getenv "HUGO_ENV") "production" }} | ||
<!-- Algolia DocSearch, Reference: https://community.algolia.com/docsearch/dropdown.html --> | ||
<!-- Algolia DocSearch, Reference: https://docsearch.algolia.com/docs/DocSearch-v3 --> | ||
<!-- Before the closing </body> --> | ||
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@alpha"></script> | ||
<script src="{{ "js/docsearch-v3.js" | relURL }}"></script> | ||
{{ if eq (getenv "HUGO_ENV") "production" }} | ||
<script> | ||
docsearch({ | ||
// Your apiKey and indexName will be given to you once | ||
// we create your config | ||
apiKey: {{ getenv "SEARCH_API_KEY" }}, | ||
container: '#docsearch', | ||
appId: {{ getenv "SEARCH_APP_ID" }}, | ||
indexName: {{ getenv "SEARCH_INDEX_NAME" }}, | ||
appId: {{ getenv "SEARCH_APP_ID" }}, // Should be only included if you are running DocSearch on your own. | ||
// Replace inputSelector with a CSS selector | ||
// matching your search input | ||
inputSelector: 'input', | ||
// Set debug to true if you want to inspect the dropdown | ||
debug: false, | ||
apiKey: {{ getenv "SEARCH_API_KEY" }}, | ||
}); | ||
</script> | ||
{{ end }} | ||
{{ end }} |
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,2 @@ | ||
import docsearch from '@docsearch/js'; | ||
import '@docsearch/css'; |