2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Enable docsearch in development env.

Previously a search redirected to `https://getbootstrap.com/...`
This commit is contained in:
m5o
2018-03-07 16:30:13 +02:00
committed by XhmikosR
parent d01b4eb025
commit 483e49e3c6
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -115,7 +115,8 @@
},
transformData: function (hits) {
return hits.map(function (hit) {
hit.url = hit.url.replace('https://v4-alpha.getbootstrap.com', '/docs/4.0')
var baseurl = document.getElementById('search-input').getAttribute('data-baseurl')
hit.url = hit.url.replace('https://getbootstrap.com' + baseurl, baseurl)
return hit
})
},