1
0
mirror of https://github.com/minio/docs.git synced 2025-07-28 19:42:10 +03:00

Minor fix to filter results based on platform

This commit is contained in:
Ravind Kumar
2022-09-16 18:34:25 -04:00
committed by Harshavardhana
parent b72a4667bd
commit 0b9a9effb2

View File

@ -302,6 +302,7 @@ window.addEventListener("DOMContentLoaded", (event) => {
// -------------------------------------------------- // --------------------------------------------------
(function () { (function () {
const docSearchEl = document.getElementById("docsearch"); const docSearchEl = document.getElementById("docsearch");
const platform = document.head.querySelector('meta[name="docsearch:platform"]').content
if(docSearchEl) { if(docSearchEl) {
// Init Docsearch // Init Docsearch
@ -311,6 +312,9 @@ window.addEventListener("DOMContentLoaded", (event) => {
indexName: 'minio', indexName: 'minio',
apiKey: '6bc246d81fd3b79f51cf88f0b2481bac', apiKey: '6bc246d81fd3b79f51cf88f0b2481bac',
placeholder: 'Search Documentation', placeholder: 'Search Documentation',
searchParameters: {
facetFilters: ['platform:' + platform]
}
}); });
// Trigger Docsearch modal on custom button clicks // Trigger Docsearch modal on custom button clicks