<script id="site-script" src="{{{uiRootPath}}}/js/site.js" data-ui-root-path="{{{uiRootPath}}}"></script>
<script async src="{{{uiRootPath}}}/js/vendor/highlight.js"></script>
<script async src="{{{uiRootPath}}}/js/vendor/tabs.js"></script>
{{#if env.SITE_SEARCH_PROVIDER}}
<script async src="{{{uiRootPath}}}/js/vendor/lunr.js"></script>
<script async src="{{{uiRootPath}}}/js/search-ui.js" id="search-ui-script" data-base-path="{{siteRootPath}}" data-page-url="{{page.url}}" data-lunr-index-path="{{siteRootPath}}/search-index.js"></script>
<script>
;(function () {
  var el = document.getElementById('search-ui-script')
  if (!el) return
  el.addEventListener('load', function () {
    var s = document.createElement('script')
    s.src = el.dataset.lunrIndexPath
    document.head.appendChild(s)
  })
})()
</script>
{{/if}}
