diff --git a/source/layouts/layout.haml b/source/layouts/layout.haml index bd6443a..64f23e1 100644 --- a/source/layouts/layout.haml +++ b/source/layouts/layout.haml @@ -157,6 +157,15 @@ apiKey: 'a409ff5d6a2476083c1a8dd1f8c04ec5', indexName: 'sass-lang', inputSelector: 'input.search', + transformData: function(hits) { + var domain = window.location.origin + "/"; + hits.forEach(function(hit) { + if (!hit.url.startsWith(domain)) { + hit.url = hit.url.replace(/^https?:\/\/[^\/]+\//, domain); + } + }); + return hits; + }, debug: false }); = javascript_include_tag 'vendor/modernizr.custom.min'