1
0
mirror of https://github.com/minio/docs.git synced 2025-07-27 08:41:57 +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 () {
const docSearchEl = document.getElementById("docsearch");
const platform = document.head.querySelector('meta[name="docsearch:platform"]').content
if(docSearchEl) {
// Init Docsearch
@ -311,6 +312,9 @@ window.addEventListener("DOMContentLoaded", (event) => {
indexName: 'minio',
apiKey: '6bc246d81fd3b79f51cf88f0b2481bac',
placeholder: 'Search Documentation',
searchParameters: {
facetFilters: ['platform:' + platform]
}
});
// Trigger Docsearch modal on custom button clicks