Skip to content

Commit b7a98b8

Browse files
committed
Enables result highlighting
1 parent 7f91602 commit b7a98b8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

layouts/partials/hooks/head-end.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
{{ end }}
1111

1212
{{ if .Site.Params.offlineSearchPagefind -}}
13+
<!-- Needed to highlight search keyword on the result page -->
1314
<script
15+
src="/pagefind/pagefind-highlight.js"
1416
type="application/x-javascript"></script>
17+
<script type="module">
18+
await import('/pagefind/pagefind-highlight.js');
19+
new PagefindHighlight({ highlightParam: "highlight" });
20+
</script>
1521
{{ end -}}

0 commit comments

Comments
 (0)