Skip to content

Commit

Permalink
fix(theme): fix broken search index when hosting docs locally
Browse files Browse the repository at this point in the history
Update default.hbs to retrieve search.json instead of legacy seach.js when loaded over file://
protocol
  • Loading branch information
mipatterson committed May 3, 2020
1 parent 12650be commit 67996cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion theme/v2/layouts/default.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<div class="overlay"></div>
<script src="{{relativeURL "assets/js/main.js"}}"></script>
<script>if (location.protocol == 'file:') document.write('<script src="{{relativeURL "assets/js/search.js"}}"><' + '/script>');</script>
<script>if (location.protocol == 'file:') document.write('<script src="{{relativeURL "assets/js/search.json"}}"><' + '/script>');</script>

{{> analytics}}

Expand Down

0 comments on commit 67996cc

Please sign in to comment.