mirror of
https://github.com/kubesphere/website.git
synced 2025-12-26 00:12:48 +00:00
Remove url patch in algolia
This commit is contained in:
parent
7b07444fd4
commit
e34e388a74
|
|
@ -17,24 +17,24 @@ docsearch({
|
|||
facetFilters: [`lang:${language}`],
|
||||
hitsPerPage: 10,
|
||||
},
|
||||
transformData: function(hits) {
|
||||
hits.forEach(hit => {
|
||||
if (typeof window !== undefined) {
|
||||
var host = window.location.host
|
||||
if (host == 'kubesphere.com.cn') {
|
||||
if (language == 'en') {
|
||||
host = host + '/en'
|
||||
hit.url = hit.url.replace('kubesphere.io', host)
|
||||
} else if (language == 'zh') {
|
||||
hit.url = hit.url.replace('kubesphere.io/zh', host)
|
||||
}
|
||||
} else {
|
||||
hit.url = hit.url.replace('kubesphere.io', host)
|
||||
}
|
||||
}
|
||||
})
|
||||
return hits
|
||||
},
|
||||
// transformData: function(hits) {
|
||||
// hits.forEach(hit => {
|
||||
// if (typeof window !== undefined) {
|
||||
// var host = window.location.host
|
||||
// if (host == 'kubesphere.com.cn') {
|
||||
// if (language == 'en') {
|
||||
// host = host + '/en'
|
||||
// hit.url = hit.url.replace('kubesphere.io', host)
|
||||
// } else if (language == 'zh') {
|
||||
// hit.url = hit.url.replace('kubesphere.io/zh', host)
|
||||
// }
|
||||
// } else {
|
||||
// hit.url = hit.url.replace('kubesphere.io', host)
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// return hits
|
||||
// },
|
||||
debug: false,
|
||||
})
|
||||
</script>
|
||||
Loading…
Reference in New Issue