|
@ -24,6 +24,13 @@ function initDocSearch(locale) { |
|
|
indexName: 'ant_design', |
|
|
indexName: 'ant_design', |
|
|
inputSelector: '#search-box input', |
|
|
inputSelector: '#search-box input', |
|
|
algoliaOptions: { facetFilters: [`tags:${lang}`] }, |
|
|
algoliaOptions: { facetFilters: [`tags:${lang}`] }, |
|
|
|
|
|
transformData(hits) { |
|
|
|
|
|
hits.forEach((hit) => { |
|
|
|
|
|
hit.url = hit.url.replace('ant.design', location.host); |
|
|
|
|
|
hit.url = hit.url.replace('https:', location.protocol); |
|
|
|
|
|
}); |
|
|
|
|
|
return hits; |
|
|
|
|
|
}, |
|
|
debug: false, // Set debug to true if you want to inspect the dropdown |
|
|
debug: false, // Set debug to true if you want to inspect the dropdown |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|