Skip to content

Commit

Permalink
Loading lunr.js is not critical for page rendering and can be deferred (
Browse files Browse the repository at this point in the history
google#1050)

* Loading lunr.js is not critical for page rendering and can be deferred

* Remove async to make sure lunr is available for offline-search.js
  • Loading branch information
fekete-robert committed Sep 13, 2022
1 parent f008584 commit a2bace6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK"
crossorigin="anonymous"></script>
{{ if .Site.Params.offlineSearch -}}
<script
<script defer
src="https://unpkg.com/lunr@2.3.9/lunr.min.js"
integrity="sha384-203J0SNzyqHby3iU6hzvzltrWi/M41wOP5Gu+BiJMz5nwKykbkUx8Kp7iti0Lpli"
crossorigin="anonymous"></script>
Expand Down

0 comments on commit a2bace6

Please sign in to comment.