Skip to content

Commit

Permalink
Only Include Page Search for Search Page
Browse files Browse the repository at this point in the history
Closes gh-158
  • Loading branch information
rwinch committed Sep 21, 2023
1 parent 43ab39b commit 3b00b5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/partials/search.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/algoliasearch-lite.umd.js" integrity="sha256-Lf9DrpGmcRip6OQzbcL6lnvNmoZNSKpyQX5pMlwatWE=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.production.min.js" integrity="sha256-xYsZPDeNjYNTBWLvqD2Lxe98hOxcDgOHyMPfz4tVAbk=" crossorigin="anonymous"></script>
<script async id="search-script" src="{{{uiRootPath}}}/js/vendor/search.js"{{#if env.ALGOLIA_APP_ID}} data-app-id="{{env.ALGOLIA_APP_ID}}"{{/if}} data-api-key="{{env.ALGOLIA_API_KEY}}" data-index-name="{{env.ALGOLIA_INDEX_NAME}}" data-stylesheet="{{{uiRootPath}}}/css/vendor/search.css" data-page-version="{{{page.version}}}" data-page-component="{{{page.component.name}}}"></script>
{{#if (eq page.attributes.article 'search')}}
<script id="page-search-script" async src="{{{uiRootPath}}}/js/vendor/page-search.js"{{#if env.ALGOLIA_APP_ID}} data-app-id="{{env.ALGOLIA_APP_ID}}"{{/if}} data-api-key="{{env.ALGOLIA_API_KEY}}" data-index-name="{{env.ALGOLIA_INDEX_NAME}}" data-stylesheet="{{{uiRootPath}}}/css/vendor/search.css" data-page-version="{{{page.version}}}" data-page-component="{{{page.component.name}}}"></script>
{{/if}}
{{/if}}

0 comments on commit 3b00b5a

Please sign in to comment.