Skip to content

Commit

Permalink
fix: generate search index meta even if search.indexPreload is false
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed May 6, 2023
1 parent 29cba7f commit ece5f95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/assets/search/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
{{- $page.Scratch.Set "indexPage" . }}
{{- $index := $tmpl | resources.ExecuteAsTemplate $indexURL $page }}
{{- $searchIndies = $searchIndies | append $index.RelPermalink }}
{{- if $preload }}
<meta name="search-index" content="{{ $index.RelPermalink }}">
{{- if $preload }}
<link rel="preload" href="{{ $index.RelPermalink }}" as="fetch" type="application/json" crossorigin="anonymous">
{{- end }}
{{- end }}

0 comments on commit ece5f95

Please sign in to comment.