mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
site: Replace hit url
This commit is contained in:
parent
94944431f1
commit
c06b0e93a0
@ -24,6 +24,13 @@ function initDocSearch(locale) {
|
||||
indexName: 'ant_design',
|
||||
inputSelector: '#search-box input',
|
||||
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
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user