Skip to content

Commit db31255

Browse files
committed
hotkeys.js is managed dependency
- This ensures that the version is managed - This also ensures we are not relying on an external URL for the JavaScript location which has broken in the past Closes gh-285
1 parent d3c6c45 commit db31255

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

package-lock.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"dependencies": {
7373
"@algolia/client-search": "^4.17.0",
7474
"@primer/octicons": "^19.8.0",
75+
"hotkeys-js": "^4.0.0-beta.6",
7576
"init": "^0.1.2"
7677
}
7778
}

src/js/vendor/hotkeys.bundle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('hotkeys-js')

src/partials/search.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</div>
2222
</div>
2323

24-
<script src="https://unpkg.com/hotkeys-js/dist/hotkeys.min.js"></script>
24+
<script src="{{{uiRootPath}}}/js/vendor/hotkeys.js"></script>
2525
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/algoliasearch-lite.umd.js" integrity="sha256-Lf9DrpGmcRip6OQzbcL6lnvNmoZNSKpyQX5pMlwatWE=" crossorigin="anonymous"></script>
2626
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.production.min.js" integrity="sha256-xYsZPDeNjYNTBWLvqD2Lxe98hOxcDgOHyMPfz4tVAbk=" crossorigin="anonymous"></script>
2727
<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-generation="{{{page.componentVersion.versionSegment}}}" data-page-component="{{{page.component.name}}}"></script>

0 commit comments

Comments
 (0)