aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/site/assets/js/search.js
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/site/assets/js/search.js')
-rw-r--r--vendor/twbs/bootstrap/site/assets/js/search.js24
1 files changed, 17 insertions, 7 deletions
diff --git a/vendor/twbs/bootstrap/site/assets/js/search.js b/vendor/twbs/bootstrap/site/assets/js/search.js
index b095d3bbd..b2bd660a4 100644
--- a/vendor/twbs/bootstrap/site/assets/js/search.js
+++ b/vendor/twbs/bootstrap/site/assets/js/search.js
@@ -2,21 +2,31 @@
// IT'S ALL JUST JUNK FOR OUR DOCS!
// ++++++++++++++++++++++++++++++++++++++++++
-(() => {
- 'use strict'
+/*!
+ * JavaScript for Bootstrap's docs (https://getbootstrap.com/)
+ * Copyright 2024-2025 The Bootstrap Authors
+ * Licensed under the Creative Commons Attribution 3.0 Unported License.
+ * For details, see https://creativecommons.org/licenses/by/3.0/.
+ */
+
+import docsearch from '@docsearch/js'
+// https://gohugo.io/hugo-pipes/js/#options
+// eslint-disable-next-line import/no-unresolved
+import { appId, apiKey, indexName } from '@params';
+(() => {
const searchElement = document.getElementById('docsearch')
- if (!window.docsearch || !searchElement) {
+ if (!searchElement) {
return
}
const siteDocsVersion = searchElement.getAttribute('data-bd-docs-version')
- window.docsearch({
- apiKey: '3151f502c7b9e9dafd5e6372b691a24e',
- indexName: 'bootstrap',
- appId: 'AK7KMZKZHQ',
+ docsearch({
+ apiKey,
+ indexName,
+ appId,
container: searchElement,
searchParameters: {
facetFilters: [`version:${siteDocsVersion}`]